-
Notifications
You must be signed in to change notification settings - Fork 12
182 lines (150 loc) · 5.27 KB
/
parallel-tests.yaml
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
# Copyright 2024 Defense Unicorns
# SPDX-License-Identifier: AGPL-3.0-or-later OR LicenseRef-Defense-Unicorns-Commercial
name: Helper workflow for E2E Tests
on:
workflow_call: # This is the event that triggers the workflow
jobs:
build:
runs-on: ubuntu-latest
steps:
# Checkout the repo and setup the tooling for this job
- name: Checkout
uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4.2.1
with:
fetch-depth: 0
- name: Setup golang
uses: ./.github/actions/golang
- name: Install UDS CLI
uses: ./.github/actions/install-uds-cli
- name: Build CLI
run: |
uds run build-cli-linux-amd
# Upload the contents of the build directory for later stages to use
- name: Upload build artifacts
uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # v4.4.3
with:
name: build-artifacts
path: build/
retention-days: 1
test-bundle:
runs-on: ubuntu-latest
needs: build
strategy:
matrix:
test: [bundle, deploy-flags, index]
steps:
- name: Checkout
uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4.2.1
with:
fetch-depth: 0
- name: setup-using-previous-job
uses: ./.github/actions/setup-from-previous
- name: Run e2e bundle tests
run: |
build/uds run test:${{ matrix.test }}
- name: Save logs
if: always()
uses: defenseunicorns/uds-common/.github/actions/save-logs@e3008473beab00b12a94f9fcc7340124338d5c08 # v0.13.1
with:
suffix: ${{ matrix.test }}
test-dev:
runs-on: ubuntu-latest
needs: build
steps:
- name: Checkout
uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4.2.1
with:
fetch-depth: 0
- name: setup-using-previous-job
uses: ./.github/actions/setup-from-previous
- name: Run e2e dev
run: |
build/uds run test:dev
- name: Save logs
if: always()
uses: defenseunicorns/uds-common/.github/actions/save-logs@e3008473beab00b12a94f9fcc7340124338d5c08 # v0.13.1
with:
suffix: test-dev
test-variables:
runs-on: ubuntu-latest
needs: build
steps:
- name: Checkout
uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4.2.1
with:
fetch-depth: 0
- name: setup-using-previous-job
uses: ./.github/actions/setup-from-previous
- name: Run e2e variable tests
run: |
build/uds run test:variable
- name: Save logs
if: always()
uses: defenseunicorns/uds-common/.github/actions/save-logs@e3008473beab00b12a94f9fcc7340124338d5c08 # v0.13.1
with:
suffix: test-variables
test-optional-bundle:
runs-on: ubuntu-latest
needs: build
steps:
- name: Checkout
uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4.2.1
with:
fetch-depth: 0
- name: setup-using-previous-job
uses: ./.github/actions/setup-from-previous
- name: Run e2e optional bundle tests
run: |
build/uds run test:optional-bundle
- name: Save logs
if: always()
uses: defenseunicorns/uds-common/.github/actions/save-logs@e3008473beab00b12a94f9fcc7340124338d5c08 # v0.13.1
with:
suffix: test-optional-bundle
test-vendor:
runs-on: ubuntu-latest
needs: build
steps:
- name: Checkout
uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4.2.1
with:
fetch-depth: 0
- name: setup-using-previous-job
uses: ./.github/actions/setup-from-previous
- name: Install Trivy
run: |
sudo apt-get install wget apt-transport-https gnupg -y
wget -qO - https://aquasecurity.github.io/trivy-repo/deb/public.key | gpg --dearmor | sudo tee /usr/share/keyrings/trivy.gpg > /dev/null
echo "deb [signed-by=/usr/share/keyrings/trivy.gpg] https://aquasecurity.github.io/trivy-repo/deb generic main" | sudo tee /etc/apt/sources.list.d/trivy.list
sudo apt-get update
sudo apt-get install trivy -y
- name: Run e2e vendor tests
run: |
build/uds run test:vendor
build/uds run test:completion
- name: Save logs
if: always()
uses: defenseunicorns/uds-common/.github/actions/save-logs@e3008473beab00b12a94f9fcc7340124338d5c08 # v0.13.1
with:
suffix: test-vendor
test-engine:
runs-on: ubuntu-latest
needs: build
steps:
- name: Checkout
uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4.2.1
with:
fetch-depth: 0
- uses: actions/setup-node@48b90677b6048efbc723b11a94acb950d3f1ac36
with:
node-version: 20
- name: setup-using-previous-job
uses: ./.github/actions/setup-from-previous
- name: Run e2e optional bundle tests
run: |
build/uds run test:engine-e2e
- name: Save logs
if: always()
uses: defenseunicorns/uds-common/.github/actions/save-logs@e3008473beab00b12a94f9fcc7340124338d5c08 # v0.13.1
with:
suffix: test-engine