forked from etingof/pysmi
-
Notifications
You must be signed in to change notification settings - Fork 4
66 lines (63 loc) · 1.57 KB
/
build-test.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
name: CI
on:
push:
branches:
- "main"
- "develop"
pull_request:
branches: [main, develop]
jobs:
build:
name: build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Setup python
uses: actions/setup-python@v2
with:
python-version: 3.7
- name: Run image
uses: abatilo/[email protected]
with:
poetry-version: "1.1.11"
- name: Build
run: |
poetry install
poetry build
- uses: actions/[email protected]
with:
name: dist
path: dist
- uses: actions/[email protected]
with:
name: output
path: output
run-unit-tests:
name: test-unit
strategy:
matrix:
os: [ubuntu-latest, macos-latest]
python: ["3.7", "3.8", "3.9", "3.10", "pypy-3.8"]
poetry-version: ["1.1.11"]
fail-fast: false
runs-on: ${{ matrix.os }}
needs:
- build
steps:
- uses: actions/checkout@v2
- name: Setup python
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python }}
- name: Run image
uses: abatilo/[email protected]
with:
poetry-version: ${{ matrix.poetry-version }}
- name: run tests
run: |
poetry install
poetry run pytest --junitxml=test-results/results.xml --cov=./ --cov-report=xml tests
- uses: actions/[email protected]
with:
name: unit tests test-results
path: test-results