Skip to content

Added template

Added template #1

Workflow file for this run

---
name: main
# Automatically cancel a previous run.
concurrency:
group: ${{ github.head_ref || github.run_id }}
cancel-in-progress: true
# yamllint disable rule:line-length
on:
push:
branches: [main]
pull_request:
branches: ['*']
jobs:
run-tests:
name: Run tests for ${{ matrix.os }} on Python 3.13
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
steps:
- uses: actions/checkout@v4
- name: Install TinyTex
uses: r-lib/actions/setup-tinytex@v2
if: runner.os != 'Windows'
- name: Install additional LaTeX packages
run: |
tlmgr update --self
tlmgr install a4wide beamer biber biblatex caption eurosym grfext minibox moreverb ntgclass relsize setspace xfrac
tlmgr list --only-installed
if: runner.os != 'Windows'
- uses: prefix-dev/[email protected]
with:
pixi-version: v0.41.4
cache: true
cache-write: ${{ github.event_name == 'push' && github.ref_name == 'main' }}
activate-environment: true
frozen: true
- name: Run pytest on MacOS
shell: bash {0}
run: pixi run pytest
if: runner.os == 'MacOS'
- name: Run tests (except pytask) on Windows
shell: bash {0}
run: pixi run pytest -k "not pytask"
if: runner.os == 'Windows'
- name: Run pytest (with coverage) on Linux
shell: bash {0}
run: pixi run pytest --cov-report=xml --cov=./
if: runner.os == 'Linux'
- name: Upload coverage reports
uses: codecov/codecov-action@v4
if: runner.os == 'Linux'
with:
token: ${{ secrets.CODECOV_TOKEN }}