From 3ec1eb3764276098d7776644e4de05859ed8f3fa Mon Sep 17 00:00:00 2001 From: Erik Reinert <4638629+erikreinert@users.noreply.github.com> Date: Thu, 2 May 2024 23:58:41 -0700 Subject: [PATCH] Update CI Workflow with Checks (#14) * 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 --- .github/workflows/flake.yaml | 22 ++++++++++++++++++++-- 1 file changed, 20 insertions(+), 2 deletions(-) diff --git a/.github/workflows/flake.yaml b/.github/workflows/flake.yaml index 36b5e52..0fed31d 100644 --- a/.github/workflows/flake.yaml +++ b/.github/workflows/flake.yaml @@ -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: @@ -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 }}"