52 lines
1.0 KiB
YAML
52 lines
1.0 KiB
YAML
name: Codecov
|
|
|
|
on:
|
|
push:
|
|
branches: [ "main" ]
|
|
paths:
|
|
- 'pcdigitizer/**'
|
|
- 'tests/**'
|
|
- 'pixi.toml'
|
|
- 'pixi.lock'
|
|
pull_request:
|
|
branches: [ "main" ]
|
|
paths:
|
|
- 'pcdigitizer/**'
|
|
- 'tests/**'
|
|
- 'pixi.toml'
|
|
- 'pixi.lock'
|
|
workflow_dispatch:
|
|
|
|
jobs:
|
|
run:
|
|
name: codecov
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
- name: Checkout code
|
|
uses: actions/checkout@v6
|
|
with:
|
|
lfs: true
|
|
|
|
- name: Install pixi
|
|
uses: prefix-dev/setup-pixi@v0.9.4
|
|
with:
|
|
environments: dev
|
|
locked: false
|
|
frozen: false
|
|
cache: true
|
|
cache-write: ${{ github.event_name == 'push' && github.ref_name == 'main' }}
|
|
activate-environment: true
|
|
|
|
- name: Get test coverage
|
|
run: pixi run tests
|
|
|
|
- name: Upload to Codecov
|
|
uses: codecov/codecov-action@v5
|
|
with:
|
|
env_vars: OS,PYTHON
|
|
fail_ci_if_error: true
|
|
verbose: true
|
|
token: ${{ secrets.CODECOV_TOKEN }}
|
|
|