Skip to content

Commit

Permalink
ci(precheck): speed up precheck tests
Browse files Browse the repository at this point in the history
  • Loading branch information
urish committed Nov 11, 2023
1 parent 5f436d7 commit 31261ea
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 8 deletions.
16 changes: 13 additions & 3 deletions .github/workflows/test-precheck.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,10 @@ jobs:

steps:
- name: Check out code
uses: actions/checkout@v2
uses: actions/checkout@v4

- name: Set up Python
uses: actions/setup-python@v2
uses: actions/setup-python@v4
with:
python-version: '3.11'
cache: 'pip'
Expand All @@ -34,7 +34,17 @@ jobs:
pdk_root: ${{ env.PDK_ROOT }}

- name: Install nix
uses: cachix/install-nix-action@v20
uses: cachix/install-nix-action@v23

- name: Cache Nix packages
uses: rikhuijzer/[email protected]
with:
key: nix-${{ hashFiles('precheck/default.nix') }}
nix_file: 'precheck/default.nix'

- name: Build Nix packages
working-directory: precheck
run: nix-build

- name: Run tests
working-directory: precheck
Expand Down
6 changes: 1 addition & 5 deletions precheck/default.nix
Original file line number Diff line number Diff line change
@@ -1,8 +1,4 @@
{ pkgs ? import
(builtins.fetchGit {
url = "https://github.com/NixOS/nixpkgs.git";
rev = "f2bd8adf7b78d7616b52d0ef08865c7c2fcf189d";
})
{ pkgs ? import (fetchTarball "https://github.com/NixOS/nixpkgs/archive/f2bd8adf7b78d7616b52d0ef08865c7c2fcf189d.tar.gz")
{ }
, magic ? import ./nix/magic.nix { inherit pkgs; }
,
Expand Down

0 comments on commit 31261ea

Please sign in to comment.