Skip to content

Presentation material for inspiration showcases (#319) #984

Presentation material for inspiration showcases (#319)

Presentation material for inspiration showcases (#319) #984

Workflow file for this run

name: CI
on:
workflow_dispatch:
pull_request:
push:
branches:
- main
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
defaults:
run:
shell: bash -el {0}
env:
# Many color libraries just need this to be set to any value, but at least
# one distinguishes color depth, where "3" -> "256-bit color".
FORCE_COLOR: 3
jobs:
cache-pixi-lock:
runs-on: ubuntu-slim
outputs:
cache-key: ${{ steps.pixi-lock.outputs.cache-key }}
pixi-version: ${{ steps.pixi-lock.outputs.pixi-version }}
steps:
- uses: actions/checkout@v4
- uses: Parcels-code/pixi-lock/create-and-cache@38495788b79a5ff26009aecc15daa9a8310b8832 # v0.1.0
id: pixi-lock
- uses: actions/upload-artifact@v6 # make available as an artifact for local testing
with:
name: pixi-lock
path: pixi.lock
tests:
name: "Unit tests: ${{ matrix.runs-on }} | pixi run -e ${{ matrix.pixi-environment }} tests"
runs-on: ${{ matrix.runs-on }}
needs: cache-pixi-lock
strategy:
fail-fast: false
matrix:
pixi-environment: ["test-latest"]
runs-on: [ubuntu-latest, windows-latest, macos-14]
include:
- pixi-environment: "test-py310"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
with:
fetch-depth: 0
- uses: Parcels-code/pixi-lock/restore@38495788b79a5ff26009aecc15daa9a8310b8832 # v0.1.0
with:
cache-key: ${{ needs.cache-pixi-lock.outputs.cache-key }}
- uses: prefix-dev/setup-pixi@v0.9.4
with:
cache: true
cache-write: ${{ github.event_name == 'push' && github.ref_name == 'main' }}
pixi-version: ${{ needs.cache-pixi-lock.outputs.pixi-version }}
- name: Test package
run:
pixi run -e ${{ matrix.pixi-environment }} tests -ra --cov --cov-report=xml --cov-report=term
--durations=20
- name: Upload coverage report
uses: codecov/codecov-action@v5.5.2
with:
token: ${{ secrets.CODECOV_TOKEN }}
# typechecking:
# name: "TypeChecking: pixi run typing"
# runs-on: ubuntu-latest
# if: false
# needs: cache-pixi-lock
# steps:
# - uses: actions/checkout@v4
# with:
# fetch-depth: 0
# - uses: Parcels-code/pixi-lock/restore@38495788b79a5ff26009aecc15daa9a8310b8832 # v0.1.0
# with:
# cache-key: ${{ needs.cache-pixi-lock.outputs.cache-key }}
# - uses: prefix-dev/setup-pixi@v0.9.4
# with:
# cache: true
# pixi-version: ${{ needs.cache-pixi-lock.outputs.pixi-version }}
# cache-write: ${{ github.event_name == 'push' && github.ref_name == 'main' }}
# - name: Typechecking
# run: pixi run typing --non-interactive --html-report mypy-report
# - name: Upload test results
# if: ${{ always() }} # Upload even on mypy error
# uses: actions/upload-artifact@v4
# with:
# name: Mypy report
# path: mypy-report