-
Notifications
You must be signed in to change notification settings - Fork 13
44 lines (40 loc) · 1.37 KB
/
build-tests.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
name: Unit Tests
on:
push:
jobs:
build_tests:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-20.04]
python-version: ["3.10"]
# os: [ubuntu-20.04, ubuntu-22.04, macos-latest, windows-latest]
# python-version: ["3.7", "3.8", "3.9", "3.10", "3.11", "3.12"]
# exclude:
# - os: ubuntu-22.04
# python-version: "3.6"
steps:
- uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
- name: Install tmu
run: |
pip install .
pip install .[composite]
pip install .[examples]
pip install .[tests]
- name: Test with pytest
run: pytest test --doctest-modules --junitxml=junit/test-results-${{ matrix.os }}-${{ matrix.python-version }}.xml
- name: Upload pytest test results
uses: actions/upload-artifact@v3
with:
name: pytest-results-${{ matrix.os }}-${{ matrix.python-version }}
path: junit/test-results-${{ matrix.os }}-${{ matrix.python-version }}.xml
# Use always() to always run this step to publish test results when there are test failures
if: ${{ always() }}