File tree Expand file tree Collapse file tree 1 file changed +29
-4
lines changed Expand file tree Collapse file tree 1 file changed +29
-4
lines changed Original file line number Diff line number Diff line change 19
19
run : |
20
20
find tests -name '*.spec.ps1' -print0 | perl -pe 's|(.*?)\x0|"\1",|g;s|,$||;s|(.*)|tests=[\1]|' >> $GITHUB_OUTPUT
21
21
22
+ find-checks :
23
+ name : Find Flake Checks 🔍
24
+ runs-on : ubuntu-latest
25
+ outputs :
26
+ checks : ${{ steps.checks.outputs.checks }}
27
+ steps :
28
+ - name : Checkout
29
+ uses : actions/checkout@v3
30
+ with :
31
+ fetch-depth : 0
32
+
33
+ - name : Install nix ❄️
34
+ uses : cachix/install-nix-action@v18
35
+
36
+ - name : Find checks 🔍
37
+ id : checks
38
+ run : |
39
+ nix-instantiate --json --eval --strict -E 'with builtins; attrNames (getFlake (toString ./.)).checks.${currentSystem}' | perl -pe 's|(.*)|checks=\1|' >>$GITHUB_OUTPUT
40
+
22
41
build :
23
42
name : Build 🛠️
24
43
runs-on : ubuntu-latest
42
61
path : result/tarball/nixos-wsl-installer.tar.gz
43
62
44
63
checks :
45
- name : Run Flake Checks 📋
64
+ name : Flake Checks 📋
65
+ needs :
66
+ - find-checks
67
+ strategy :
68
+ fail-fast : false
69
+ matrix :
70
+ check : ${{ fromJSON(needs.find-checks.outputs.checks) }}
46
71
runs-on : ubuntu-latest
47
72
steps :
48
73
- name : Checkout
@@ -53,11 +78,12 @@ jobs:
53
78
- name : Install nix ❄️
54
79
uses : cachix/install-nix-action@v18
55
80
56
- - name : Run checks 📋
81
+ - name : Run check 📋
57
82
run : |
58
- nix flake check -L
83
+ nix build -L --expr "with builtins; (getFlake (toString ./.)).checks.\${currentSystem}.${{ matrix.check }}"
59
84
60
85
tests :
86
+ name : Test 🧪
61
87
needs :
62
88
- find-tests
63
89
- build
68
94
- ubuntu-latest
69
95
# - windows-latest # doesn't work due to lack of nested virtualization on the runners, hopefully this will work one day
70
96
test : ${{ fromJSON(needs.find-tests.outputs.tests) }}
71
- name : Test 🧪
72
97
runs-on : ${{ matrix.os }}
73
98
steps :
74
99
- name : Checkout
You can’t perform that action at this time.
0 commit comments