Skip to content

Implement CI

Implement CI #2

Workflow file for this run

name: "Test"
on:
pull_request:
push:
jobs:
get-flake-checks:
runs-on: ubuntu-latest
outputs:
flake-checks: "${{ steps.set-outputs.outputs.checks }}"
steps:
- uses: actions/checkout@v4
- uses: cachix/install-nix-action@v27
- uses: DeterminateSystems/magic-nix-cache-action@v2
run: >
nix flake show --json
| jq -rc '.checks["x86_64-linux"]
| keys' >> "flake-checks"
- id: set-outputs
run: echo "checks=$(cat flake-checks)" >> "$GITHUB_OUTPUT"
build:
runs-on: ubuntu-latest
outputs:
flake-checks: "${{ steps.set-outputs.outputs.checks }}"
steps:
- uses: actions/checkout@v4
- uses: cachix/install-nix-action@v27
- uses: DeterminateSystems/magic-nix-cache-action@v2
- run: nix build
flake-checks:
runs-on: ubuntu-latest
needs: [ flake-checks, build ]
strategy: matrix
check: '${{ fromJSON(needs.get-flake-checks.outputs.flake-checks) }}'

Check failure on line 35 in .github/workflows/ci.yml

View workflow run for this annotation

GitHub Actions / .github/workflows/ci.yml

Invalid workflow file

You have an error in your yaml syntax on line 35
steps:
- uses: actions/checkout@v4
- uses: cachix/install-nix-action@v27
- uses: DeterminateSystems/magic-nix-cache-action@v2
- run: nix build -L ".#checks.$check"
env:
check: "${{ matrix.check }}"