feat(ci): run performance benchmarks only on ubuntu #347
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: Tests | |
on: | |
push: | |
paths: | |
- '**/*' | |
- '!docs/**' | |
jobs: | |
build: | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
os: [ubuntu-latest, windows-latest] | |
python-version: [3.x] | |
steps: | |
- name: Git clone | |
uses: actions/checkout@v4 | |
- name: Setup Python | |
uses: actions/setup-python@v5 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- uses: prefix-dev/[email protected] | |
with: | |
run-install: true | |
- name: Post-install dependencies | |
run: pixi run postinstall | |
- name: Test with pytest | |
run: pixi run test | |
- name: Upload Coverage to Codecov | |
uses: codecov/codecov-action@v3 | |
with: | |
token: ${{ secrets.CODECOV_TOKEN }} | |
files: ./coverage.xml | |
env_vars: OS,PYTHON | |
fail_ci_if_error: true | |
verbose: true | |
- name: Run benchmarks | |
if: matrix.os == 'ubuntu-latest' | |
uses: CodSpeedHQ/action@v2 | |
with: | |
token: ${{ secrets.CODSPEED_TOKEN }} | |
run: pixi run test --codspeed |