Update CI #2753
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: test | ||
on: | ||
push: | ||
branches: | ||
- master | ||
- main | ||
- dev | ||
tags: | ||
- "v*" # Push events to matching v*, i.e. v1.0, v20.15.10 | ||
pull_request: | ||
branches: | ||
- '*' # Ensure CI runs on pull requests to all branches | ||
workflow_dispatch: # Can manually trigger CI from GitHub Actions tab | ||
- "*" # Ensure CI runs on pull requests to all branches | ||
name: ${{ matrix.os }} Python ${{ matrix.python-version }} | ||
test: | ||
name: ${{ matrix.os }} ${{ matrix.python-version }} | ||
runs-on: ${{ matrix.os }} | ||
timeout-minutes: 60 | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
os: [ubuntu-latest, windows-latest, macos-latest] | ||
python-version: ["3.11", "3.12"] | ||
- name: Checkout repository | ||
steps: | ||
- name: Checkout | ||
- name: Setup Python | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
uses: actions/checkout@v4 | ||
- name: Setup micromamba | ||
uses: mamba-org/setup-micromamba@v1 | ||
shell: ${{ matrix.os == 'windows-latest' && 'pwsh' || 'bash' }} | ||
with: | ||
# Setup Qt libraries for GUI testing (Linux only) | ||
- name: Setup Qt Libraries (Linux only) | ||
if: runner.os == 'Linux' | ||
uses: tlambert03/setup-qt-libs@v1 | ||
# Setup Qt libraries for GUI testing on Linux | ||
shell: ${{ matrix.os == 'windows-latest' && 'pwsh' || 'bash' }} | ||
if: runner.os == 'Linux' | ||
uses: tlambert03/setup-qt-libs@v1 | ||
shell: ${{ matrix.os == 'windows-latest' && 'pwsh' || 'bash' }} | ||
shell: ${{ matrix.os == 'windows-latest' && 'pwsh' || 'bash -l {0}' }} | ||
run: python -m pip install -r requirements-dev.txt | ||
shell: ${{ matrix.os == 'windows-latest' && 'pwsh' || 'bash' }} | ||
run: pytest | ||
- name: Run tests | ||
uses: aganders3/headless-gui@v2 | ||
with: | ||
shell: ${{ matrix.os == 'windows-latest' && 'pwsh' || 'bash -l {0}' }} | ||
run: pytest | ||
- name: Upload coverage reports to Codecov | ||
uses: codecov/codecov-action@v3 | ||
with: | ||
token: ${{ secrets.CODECOV_TOKEN }} | ||
file: ./coverage.xml | ||
verbose: false | ||
fail_ci_if_error: false |