-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
002a433
commit 635ba4a
Showing
1 changed file
with
32 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
name: nix-flake-test | ||
on: | ||
pull_request: | ||
push: | ||
jobs: | ||
build-and-test: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
# Step 1: Checkout the repository | ||
- name: Checkout Repository | ||
uses: actions/checkout@v3 | ||
|
||
# Step 2: Install Nix | ||
- name: Install Nix with Extra Options | ||
run: | | ||
curl --proto '=https' --tlsv1.2 -sSf -L https://install.determinate.systems/nix/pr/1145 | sh -s -- install --no-confirm --extra-conf " | ||
extra-substituters = https://openlane.cachix.org | ||
extra-trusted-public-keys = openlane.cachix.org-1:qqdwh+QMNGmZAuyeQJTH9ErW57OWSvdtuwfBKdS254E= | ||
" | ||
# Step 3: Enable Nix Flakes | ||
- name: Enable Nix Flakes | ||
run: | | ||
mkdir -p ~/.config/nix | ||
echo "experimental-features = nix-command flakes" >> ~/.config/nix/nix.conf | ||
# Step 5: Build the flake with no options | ||
- name: Build Flake | ||
run: nix build . | ||
|
||
# Step 6: Run flake checks/tests | ||
- name: Run Flake Checks | ||
run: nix flake check |