-
Notifications
You must be signed in to change notification settings - Fork 4
196 lines (192 loc) · 6.35 KB
/
test.yml
File metadata and controls
196 lines (192 loc) · 6.35 KB
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
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
name: test
on:
push:
branches: [main]
pull_request:
branches: [main]
env:
CARGO_TERM_COLOR: always
permissions:
contents: read
id-token: write
jobs:
test_go:
name: Test
strategy:
fail-fast: false
matrix:
platform:
- macos-15
- ubuntu-24.04
- ubuntu-24.04-arm
- windows-2025
runs-on: ${{ matrix.platform }}
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v5
- uses: actions/setup-go@4a3601121dd01d1626a1e23e37211e3254c1c06c # v6
with:
go-version-file: go.mod
cache: true
- uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6
- run: |
make test
- uses: test-summary/action@37b508cfee6d4d080eedd00b5bb240a6a784a6a5 # v2
if: ${{ always() }}
with:
paths: ${{ github.workspace }}/junit.xml
show: "fail"
- uses: codecov/codecov-action@e79a6962e0d4c0c17b229090214935d2e33f8354 # v5
if: ${{ always() }}
with:
use_oidc: true
flags: go-${{ matrix.platform }}
files: ${{ github.workspace }}/coverage.txt
- uses: codecov/codecov-action@e79a6962e0d4c0c17b229090214935d2e33f8354 # v5
if: ${{ always() }}
with:
use_oidc: true
flags: go-${{ matrix.platform }}
files: ${{ github.workspace }}/junit.xml
report_type: test_results
lint_go:
name: Lint (go)
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v5
- uses: actions/setup-go@4a3601121dd01d1626a1e23e37211e3254c1c06c # v6
with:
go-version-file: go.mod
cache: true
- name: Install libraries
run: sudo apt-get update && sudo apt-get install -y libpam0g-dev libudev-dev
- uses: golangci/golangci-lint-action@1e7e51e771db61008b38414a730f564565cf7c20 # v8
with:
args: --timeout 5000s
lint_rs:
name: Lint (rust)
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v5
- run: |
sudo apt-get update
sudo apt-get install -y libpam0g-dev libudev-dev
- run: make lint-rs
lint_js:
name: Lint
strategy:
fail-fast: false
matrix:
target:
- browser-ext
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v5
- uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6
with:
node-version-file: "${{ matrix.target }}/package.json"
cache: "npm"
cache-dependency-path: "${{ matrix.target }}/package-lock.json"
- run: make ${{ matrix.target }}/lint
lint_cpp:
name: Lint
strategy:
fail-fast: false
matrix:
target:
- ee/wcp
runs-on: windows-2025
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v5
- run: make ${{ matrix.target }}/lint
test_go_int:
name: Test (integration)
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v5
- uses: actions/setup-go@4a3601121dd01d1626a1e23e37211e3254c1c06c # v6
with:
go-version-file: go.mod
cache: true
- uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6
- uses: goauthentik/action-setup-authentik@9640994d98397fb40b525e6795c29d407ad201fa # v2.0
id: setup
with:
version: beta
sentry_env: goauthentik-platform-ci
blueprints_path: ./hack/authentik/blueprints
wait: true
- env:
AK_TOKEN: ${{ steps.setup.outputs.admin_token }}
AK_URL: ${{ steps.setup.outputs.http_url }}
run: |
./hack/authentik/wait.sh
- run: |
make test-integration
- uses: test-summary/action@37b508cfee6d4d080eedd00b5bb240a6a784a6a5 # v2
if: ${{ always() }}
with:
paths: ${{ github.workspace }}/junit.xml
show: "fail"
- uses: codecov/codecov-action@e79a6962e0d4c0c17b229090214935d2e33f8354 # v5
if: ${{ always() }}
with:
use_oidc: true
flags: go-integration
files: ${{ github.workspace }}/coverage.txt
- uses: codecov/codecov-action@e79a6962e0d4c0c17b229090214935d2e33f8354 # v5
if: ${{ always() }}
with:
use_oidc: true
flags: go-integration
files: ${{ github.workspace }}/junit.xml
report_type: test_results
test_go_e2e:
name: Test (e2e)
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v5
- uses: actions/setup-go@4a3601121dd01d1626a1e23e37211e3254c1c06c # v6
with:
go-version-file: go.mod
cache: true
- uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6
- run: |
sudo apt-get update
sudo apt-get install -y libpam0g-dev libudev-dev
- uses: goauthentik/action-setup-authentik@9640994d98397fb40b525e6795c29d407ad201fa # v2.0
id: setup
with:
version: beta
sentry_env: goauthentik-platform-ci
blueprints_path: ./hack/authentik/blueprints
wait: true
- env:
AK_TOKEN: ${{ steps.setup.outputs.admin_token }}
AK_URL: ${{ steps.setup.outputs.http_url }}
run: |
./hack/authentik/wait.sh
- env:
AK_PASSWORD: ${{ steps.setup.outputs.admin_password }}
run: |
make test-e2e
- run: |
sudo chmod -R 777 ./e2e/coverage
make test-e2e-convert
- uses: test-summary/action@37b508cfee6d4d080eedd00b5bb240a6a784a6a5 # v2
if: ${{ always() }}
with:
paths: ${{ github.workspace }}/junit.xml
show: "fail"
- uses: codecov/codecov-action@e79a6962e0d4c0c17b229090214935d2e33f8354 # v5
if: ${{ always() }}
with:
use_oidc: true
flags: go-e2e
files: ${{ github.workspace }}/coverage.txt
- uses: codecov/codecov-action@e79a6962e0d4c0c17b229090214935d2e33f8354 # v5
if: ${{ always() }}
with:
use_oidc: true
flags: go-e2e
files: ${{ github.workspace }}/junit.xml
report_type: test_results