Skip to content

Update CI

Update CI #2753

Workflow file for this run

name: test
on:

Check failure on line 3 in .github/workflows/test.yaml

View workflow run for this annotation

GitHub Actions / .github/workflows/test.yaml

Invalid workflow file

You have an error in your yaml syntax on line 3
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