Fix simulator link #30
This file contains hidden or 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: Tests | |
on: | |
pull_request: | |
release: | |
types: [published] | |
push: | |
branches: | |
- main | |
- develop | |
jobs: | |
Test: | |
runs-on: ${{ matrix.os }} | |
defaults: | |
run: | |
working-directory: ./code | |
strategy: | |
fail-fast: false | |
matrix: | |
os: | |
- ubuntu-22.04 | |
# - macos-10.15 # doesn't run for free | |
- windows-2022 | |
version: | |
- '3.10' | |
- '3.9' | |
- '3.8' | |
# - 'pypy3.10' # broken PySide6 https://stackoverflow.com/a/76345084/3124150 | |
# - 'pypy3.9' # Make it work | |
# - 'pypy3.8' # broken PySide6 https://stackoverflow.com/a/76345084/3124150 | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up Python ${{ matrix.version }} | |
uses: actions/setup-python@v5 | |
with: | |
python-version: ${{ matrix.version }} | |
- name: Install linux deps | |
if: contains(matrix.os, 'ubuntu') | |
run: | | |
sudo apt install -y libopenblas-dev | |
- name: Upgrade pip | |
run: | | |
python -m pip install --upgrade pip | |
- name: Install jax for windows | |
# https://stackoverflow.com/a/72499565/3124150 | |
if: contains(matrix.os, 'windows') | |
run: | | |
pip install "jax[cpu]===0.3.14" -f https://whls.blob.core.windows.net/unstable/index.html --use-deprecated legacy-resolver | |
- name: Install jax for linux | |
if: contains(matrix.os, 'ubuntu') | |
run: | | |
python -m pip install "jax[cpu]" | |
- name: Install deps | |
run: | | |
python -m pip install -r requirements.txt -r dev-requirements.txt | |
- name: Test with pytest | |
run: pytest tests/ --doctest-modules --junitxml=junit/test-results-${{ matrix.version }}.xml | |
- name: Upload pytest test results | |
uses: actions/upload-artifact@v3 | |
with: | |
name: pytest-results-${{ matrix.version }} | |
path: junit/test-results-${{ matrix.version }}.xml | |
# Use always() to always run this step to publish test results when there are test failures | |
if: ${{ always() }} |