Skip to content

Commit

Permalink
Update CI Workflow with Checks (#14)
Browse files Browse the repository at this point in the history
* feat(ci): add check job and update build dependencies in flake workflow

- Introduce a new `check` job with a strategy matrix for `macos-latest` and `ubuntu-latest`.
- Adjust `build` job to depend on the successful completion of the `check` job.
- Standardize the use of `authtoken` across cachix actions.
- Remove `enable_kvm` option and redundant `nix develop -c just check` step from the `build` job.

* fix: update cachix action parameters to use correct casing and environment variables names
  • Loading branch information
erikreinert authored May 3, 2024
1 parent 3c706f3 commit 3ec1eb3
Showing 1 changed file with 20 additions and 2 deletions.
22 changes: 20 additions & 2 deletions .github/workflows/flake.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,27 @@ env:
CACHIX_BINARY_CACHE: altf4llc-os

jobs:
check:
strategy:
matrix:
os:
- macos-latest
- ubuntu-latest
runs-on: ${{ matrix.os }}
steps:
- uses: cachix/install-nix-action@v26
with:
nix_path: nixpkgs=channel:nixos-unstable
- uses: cachix/cachix-action@v14
with:
authToken: ${{ secrets.CACHIX_AUTH_TOKEN }}
name: ${{ env.CACHIX_BINARY_CACHE }}
- uses: actions/checkout@v4
- run: nix develop -c just check

build:
needs:
- check
strategy:
matrix:
os:
Expand All @@ -23,12 +43,10 @@ jobs:
steps:
- uses: cachix/install-nix-action@v26
with:
enable_kvm: true
nix_path: nixpkgs=channel:nixos-unstable
- uses: cachix/cachix-action@v14
with:
authToken: ${{ secrets.CACHIX_AUTH_TOKEN }}
name: ${{ env.CACHIX_BINARY_CACHE }}
- uses: actions/checkout@v4
- run: nix develop -c just check
- run: nix develop -c just build "${{ matrix.profile }}"

0 comments on commit 3ec1eb3

Please sign in to comment.