move testcase generation to utils #5439
Workflow file for this run
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: 'Python CI Tests' | |
on: | |
# Runs on pushes to test/ branches and main | |
push: | |
branches: | |
- 'main' | |
- 'test/**' | |
# Runs on all PRs | |
pull_request: | |
# Manual Dispatch | |
workflow_dispatch: | |
jobs: | |
python_test_job: | |
timeout-minutes: 15 | |
runs-on: ${{ matrix.os }} | |
name: 'Pure Python tests' | |
strategy: | |
fail-fast: false | |
matrix: | |
python: ["3.8", "3.9", "3.10", "3.11", "3.12"] | |
os: ["ubuntu-latest", "windows-latest", "macos-latest"] | |
# Python 3.9 is on macos-13 but not macos-latest (macos-14-arm64) | |
# https://github.com/actions/setup-python/issues/696#issuecomment-1637587760 | |
exclude: | |
- { python: "3.8", os: "macos-latest" } | |
- { python: "3.9", os: "macos-latest" } | |
include: | |
- { python: "3.8", os: "macos-13" } | |
- { python: "3.9", os: "macos-13" } | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Install Dependencies (linux) | |
if: matrix.os == 'ubuntu-latest' | |
run: | | |
sudo apt-get update | |
sudo apt-get install graphviz | |
- name: Install Dependencies (windows) | |
if: matrix.os == 'windows-latest' | |
run: | | |
choco install -y graphviz | |
New-ItemProperty -Path "HKLM:\SYSTEM\CurrentControlSet\Control\FileSystem" -Name "LongPathsEnabled" -Value 1 -PropertyType DWORD -Force | |
git config --system core.longpaths true | |
- name: Install Dependencies (macos) | |
if: matrix.os == 'macos-13' || matrix.os == 'macos-latest' | |
run: | | |
brew install graphviz | |
- name: Set up Python ${{ matrix.python }} | |
uses: actions/setup-python@v5 | |
with: | |
python-version: ${{ matrix.python }} | |
cache: pip | |
allow-prereleases: true | |
- name: Run Python tests | |
run: | | |
python3 -m pip install --upgrade pip | |
python3 -m pip install -e .[test] | |
pytest -n auto -m "not eda" --cov --cov-report=xml | |
- name: Upload coverage reports to Codecov | |
uses: codecov/codecov-action@v4 | |
with: | |
token: ${{ secrets.CODECOV_TOKEN }} | |
files: coverage.xml | |
name: codecov-${{ matrix.python }}-${{ matrix.os }} | |
verbose: true |