Update #252
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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() }} |