diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 1db5f05..b36aa53 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -17,11 +17,29 @@ jobs: github_access_token: ${{ secrets.GITHUB_TOKEN }} - run: nix fmt -- --ci + checks-matrix: + runs-on: ubuntu-latest + outputs: + matrix: ${{ steps.set-matrix.outputs.matrix }} + steps: + - uses: actions/checkout@v7 + - uses: cachix/install-nix-action@v31 + - name: compute all checks to use as a matrix + id: set-matrix + run: | + set -Eeu + matrix="$(nix flake show --json | jq '.checks."x86_64-linux"' | jq -cr 'keys')" + echo "matrix=${matrix}" >> "$GITHUB_OUTPUT" test: runs-on: ubuntu-latest + needs: checks-matrix + strategy: + fail-fast: false + matrix: + check: ${{ fromJson(needs.checks-matrix.outputs.matrix) }} steps: - uses: actions/checkout@v7 - uses: cachix/install-nix-action@v31 with: github_access_token: ${{ secrets.GITHUB_TOKEN }} - - run: nix flake check -L + - run: nix build -L '.#checks.x86_64-linux.${{ matrix.check }}'