Skip to content

Commit 10c7cad

Browse files
committed
ci: setup for detect flake config
1 parent 2dee4da commit 10c7cad

File tree

2 files changed

+24
-0
lines changed

2 files changed

+24
-0
lines changed

.github/workflows/cicd.yml

+18
Original file line numberDiff line numberDiff line change
@@ -251,13 +251,31 @@ jobs:
251251
stat ~/.cache/nix/test-path
252252
nix-store --verify-path ~/.cache/nix/test-path
253253
254+
test-nix-config-eval:
255+
needs: build
256+
runs-on: ubuntu-22.04
257+
steps:
258+
- uses: actions/checkout@v3
259+
- uses: actions/download-artifact@v3
260+
id: nix-archives
261+
with:
262+
name: nix-archives-${{ runner.os }}
263+
- uses: ./
264+
with:
265+
nix_archives_url: file://${{steps.nix-archives.outputs.download-path}}
266+
- name: Verify Nix config
267+
run: |
268+
nix build --version # check if new style command is enabled
269+
nix show-config | grep -q 'stalled-download-timeout = 333'
270+
254271
release:
255272
runs-on: ubuntu-latest
256273
needs:
257274
- build
258275
- test
259276
- test-cachix
260277
- test-overwrite-nix-dir
278+
- test-nix-config-eval
261279
if: github.event_name == 'push' && github.ref == 'refs/heads/master'
262280
steps:
263281
- uses: actions/checkout@v3

flake.nix

+6
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,12 @@
1515
nixpkgs-nix-2_0_4.flake = false;
1616
};
1717

18+
nixConfig = {
19+
# We set some dummy Nix config here so we can use it for verification in our
20+
# CI test
21+
stalled-download-timeout = 333; # default 300
22+
};
23+
1824
outputs = {
1925
self,
2026
flake-utils,

0 commit comments

Comments
 (0)