ci: nix-ify pipeline
All checks were successful
Continuous Integration / Lint, Check & Test (push) Successful in 1m28s

This commit is contained in:
Konstantin Fickel 2025-10-12 08:30:24 +02:00
parent eaf7fe9b2a
commit d5535fe2d0
Signed by: kfickel
GPG key ID: A793722F9933C1A5

View file

@ -1,43 +1,34 @@
name: Continuous Integration
on:
push:
workflow_dispatch:
push:
workflow_dispatch:
jobs:
build-and-lint:
name: Lint, Check & Test
runs-on: ubuntu-latest
runs-on: nix
steps:
- name: Check out Repository
uses: https://git.konstantinfickel.de/actions/checkout@v4
- name: Install uv
uses: astral-sh/setup-uv@v5
with:
enable-cache: true
version: "0.7.14"
- name: Set up python
uses: actions/setup-python@v5
with:
python-version-file: "pyproject.toml"
- run: nix --version
- run: nix flake check
- name: Install the project
run: uv sync --locked --all-extras --dev
run: nix develop .#impure --command bash -c "uv sync --locked --all-extras --dev"
- name: Test with PyTest
run: uv run pytest --junit-xml test-report.xml
run: nix develop .#impure --command bash -c "uv run pytest --junit-xml test-report.xml"
- name: Report test results
uses: dorny/test-reporter@v2
uses: https://github.com/dorny/test-reporter.git@v2
if: ${{ !cancelled() }}
with:
with:
name: PyTest Results
path: test-report.xml
reporter: java-junit
- name: Check with PyRight
run: uv run pyright
run: nix develop .#impure --command bash -c "uv run pyright"