-
Notifications
You must be signed in to change notification settings - Fork 0
172 lines (156 loc) · 6.13 KB
/
check.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
# SPDX-FileCopyrightText: Andrew Hayzen <[email protected]>
#
# SPDX-License-Identifier: MPL-2.0
name: check
on:
push:
branches:
- main
pull_request:
workflow_dispatch:
jobs:
license-check:
runs-on: ubuntu-22.04
steps:
- uses: actions/[email protected]
- name: REUSE Compliance Check
uses: fsfe/reuse-action@v4
flake-checker:
runs-on: ubuntu-22.04
steps:
- uses: actions/[email protected]
- uses: DeterminateSystems/flake-checker-action@v8
nix-fmt:
runs-on: ubuntu-22.04
steps:
- uses: actions/[email protected]
- uses: DeterminateSystems/nix-installer-action@v13
- uses: DeterminateSystems/magic-nix-cache-action@v7
- name: nix fmt
run: nix fmt
- name: git diff
run: git diff --exit-code
shellcheck:
runs-on: ubuntu-22.04
steps:
- uses: actions/[email protected]
# Shellcheck should already be installed on github runners
- name: install shellcheck
run: sudo apt install --yes shellcheck
- name: shellcheck
run: shellcheck scripts/*.sh
nix-flake-check-no-build:
# Run after pre checks
needs: [license-check, flake-checker, nix-fmt, shellcheck]
runs-on: ubuntu-22.04
steps:
- uses: actions/[email protected]
- uses: DeterminateSystems/nix-installer-action@v13
- uses: DeterminateSystems/magic-nix-cache-action@v7
- name: nix flake check
# Only run a check of the flake itself without building
run: nix flake --option sandbox false check --no-build --print-build-logs
nix-flake-check-lab-actual:
# Run after flake check
needs: [nix-flake-check-no-build]
runs-on: ubuntu-22.04
steps:
- uses: actions/[email protected]
- uses: DeterminateSystems/nix-installer-action@v13
- uses: DeterminateSystems/magic-nix-cache-action@v7
- name: nix build
# nix flake check doesn't have a way to specify a specific test to run
# https://github.com/NixOS/nix/issues/8881
run: nix build --option sandbox false --print-build-logs .#checks.x86_64-linux.lab-actual-test
nix-flake-check-lab-bitwarden:
# Run after flake check
needs: [nix-flake-check-no-build]
runs-on: ubuntu-22.04
steps:
- uses: actions/[email protected]
- uses: DeterminateSystems/nix-installer-action@v13
- uses: DeterminateSystems/magic-nix-cache-action@v7
- name: nix build
# nix flake check doesn't have a way to specify a specific test to run
# https://github.com/NixOS/nix/issues/8881
run: nix build --option sandbox false --print-build-logs .#checks.x86_64-linux.lab-bitwarden-test
nix-flake-check-lab-immich:
# Run after flake check
needs: [nix-flake-check-no-build]
runs-on: ubuntu-22.04
steps:
- uses: actions/[email protected]
- uses: DeterminateSystems/nix-installer-action@v13
- uses: DeterminateSystems/magic-nix-cache-action@v7
- name: nix build
# nix flake check doesn't have a way to specify a specific test to run
# https://github.com/NixOS/nix/issues/8881
run: nix build --option sandbox false --print-build-logs .#checks.x86_64-linux.lab-immich-test
nix-flake-check-lab-jellyfin:
# Run after flake check
needs: [nix-flake-check-no-build]
runs-on: ubuntu-22.04
steps:
- uses: actions/[email protected]
- uses: DeterminateSystems/nix-installer-action@v13
- uses: DeterminateSystems/magic-nix-cache-action@v7
- name: nix build
# nix flake check doesn't have a way to specify a specific test to run
# https://github.com/NixOS/nix/issues/8881
run: nix build --option sandbox false --print-build-logs .#checks.x86_64-linux.lab-jellyfin-test
nix-flake-check-lab-restic:
# Run after flake check
needs: [nix-flake-check-no-build]
runs-on: ubuntu-22.04
steps:
- uses: actions/[email protected]
- uses: DeterminateSystems/nix-installer-action@v13
- uses: DeterminateSystems/magic-nix-cache-action@v7
- name: nix build
# nix flake check doesn't have a way to specify a specific test to run
# https://github.com/NixOS/nix/issues/8881
run: nix build --option sandbox false --print-build-logs .#checks.x86_64-linux.lab-restic-test
nix-flake-check-lab-sftpgo:
# Run after flake check
needs: [nix-flake-check-no-build]
runs-on: ubuntu-22.04
steps:
- uses: actions/[email protected]
- uses: DeterminateSystems/nix-installer-action@v13
- uses: DeterminateSystems/magic-nix-cache-action@v7
- name: nix build
# nix flake check doesn't have a way to specify a specific test to run
# https://github.com/NixOS/nix/issues/8881
run: nix build --option sandbox false --print-build-logs .#checks.x86_64-linux.lab-sftpgo-test
nix-flake-check-vps-wagtail:
# Run after flake check
needs: [nix-flake-check-no-build]
runs-on: ubuntu-22.04
steps:
- uses: actions/[email protected]
- uses: DeterminateSystems/nix-installer-action@v13
- uses: DeterminateSystems/magic-nix-cache-action@v7
- name: nix build
# nix flake check doesn't have a way to specify a specific test to run
# https://github.com/NixOS/nix/issues/8881
run: nix build --option sandbox false --print-build-logs .#checks.x86_64-linux.vps-wagtail-test
nixos-anywhere-vm-test-lab:
# Run after pre checks
needs: [nix-flake-check-no-build]
runs-on: ubuntu-22.04
steps:
- uses: actions/[email protected]
- uses: DeterminateSystems/nix-installer-action@v13
- uses: DeterminateSystems/magic-nix-cache-action@v7
- name: nixos-anywhere vm-test lab
run: nix run github:nix-community/nixos-anywhere -- --flake .#lab-vm-test --vm-test
nixos-anywhere-vm-test-vps:
# Run after pre checks
needs: [nix-flake-check-no-build]
runs-on: ubuntu-22.04
steps:
- uses: actions/[email protected]
- uses: DeterminateSystems/nix-installer-action@v13
- uses: DeterminateSystems/magic-nix-cache-action@v7
- name: nixos-anywhere vm-test vps
run: nix run github:nix-community/nixos-anywhere -- --flake .#vps-vm-test --vm-test