Skip to content

ci: fix cache

ci: fix cache #163

Workflow file for this run

name: CI
on:
push:
branches: main
paths-ignore:
- "scripts/*"
- "*.md"
pull_request:
types:
- opened
- edited
- synchronize
- ready_for_review
paths-ignore:
- "scripts/*"
- "*.md"
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
cache-pixi:
uses: Glatzel/template/.github/workflows/cache-pixi.yml@main
with:
machine: windows-latest
install_cmd: pixi install -e audio -e arithmetic-cpu
ruff-lint:
uses: Glatzel/template/.github/workflows/ruff.yml@main
pytest:
strategy:
matrix:
include:
- submodule: true
pixi_python_env: audio
test_path: ./src/audio
- submodule: false
pixi_python_env: arithmetic-cpu
test_path: ./src/arithmetic
env:
PIXI_FROZEN: true
runs-on: windows-latest
steps:
- uses: actions/checkout@v4
- name: Update submodule
if: matrix.submodule
run: git submodule update --init --recursive
- name: Restore pixi cache
uses: actions/cache/restore@v4
with:
path: '~\AppData\Local\rattler'
key: pixi-${{ runner.os }}-${{ hashFiles('**/pixi.lock') }}
restore-keys: pixi-${{ runner.os }}
- name: Set up pixi
uses: prefix-dev/[email protected]
with:
run-install: false
- name: Pytest
if: success()
run: pixi run -e ${{matrix.pixi_python_env}} pytest "${{matrix.test_path}}" --junitxml=junit.xml --cov --cov-report=xml
continue-on-error: true
- name: Upload cov results to Codecov
uses: codecov/codecov-action@v4
with:
fail_ci_if_error: true
token: ${{ secrets.CODECOV_TOKEN }}
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
- name: Upload test results to Codecov
uses: codecov/test-results-action@v1
with:
fail_ci_if_error: true
token: ${{ secrets.CODECOV_TOKEN }}