-
-
Notifications
You must be signed in to change notification settings - Fork 40
284 lines (254 loc) · 8.83 KB
/
wc-integration-test.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
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
---
name: integration-test
on: workflow_call
jobs:
integration-test:
timeout-minutes: 30
runs-on: ubuntu-latest
permissions: {}
env:
GITHUB_TOKEN: ${{github.token}}
AQUA_LOG_COLOR: always
AQUA_GLOBAL_CONFIG: ${{ github.workspace }}/tests/main/aqua-global.yaml:${{ github.workspace }}/tests/main/aqua-global-2.yaml
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
persist-credentials: false
- uses: actions/setup-go@3041bf56c941b39c61721a86cd11f3bb1338122a # v5.2.0
with:
go-version-file: go.mod
cache: true
- run: go install ./cmd/aqua
- run: echo "${XDG_DATA_HOME:-$HOME/.local/share}/aquaproj-aqua/bin" >> "$GITHUB_PATH"
- run: aqua policy allow
- run: echo "standard,kubernetes-sigs/kind" | aqua g -f -
- run: echo "x-motemen/ghq" | aqua g -f -
- run: echo "local,aquaproj/aqua-installer" | aqua -c tests/main/aqua-global.yaml g -f -
- run: aqua g x-motemen/ghq aquaproj/aqua-installer
- run: echo cli/cli | aqua g -f - x-motemen/ghq aquaproj/aqua-installer suzuki-shunsuke/[email protected]
- name: Test -pin
run: aqua g --pin cli/cli suzuki-shunsuke/[email protected]
- name: Test g -g
run: aqua g -g cli/cli
- name: Test checksum
run: aqua -c aqua.yaml i
working-directory: tests/3064
- name: Test version_prefix
run: aqua -c aqua.yaml g -i kubernetes-sigs/kustomize
working-directory: tests/main
- name: Test command aliases
run: aqua i -l
working-directory: tests/aliases
- name: Test command aliases
run: terraform-013 version
working-directory: tests/aliases
- run: aqua list
- run: aqua list -installed
- run: aqua list -installed -a
- run: aqua update-checksum
working-directory: tests/main
- run: aqua update-checksum -prune
working-directory: tests/main
- run: aqua i -l -a
working-directory: tests/main
- run: aqua i
working-directory: tests/main
- run: aqua which go
- name: Test which's -v option
run: aqua which -v cosign
- run: kind version
working-directory: tests/main
- run: kind version
- run: restic version
env:
AQUA_PROGRESS_BAR: "true"
- run: migrate -version
- run: ghq -version
- run: gh version
- run: tfenv --version
- run: aqua -c tests/main/aqua-global.yaml g local,kubernetes-sigs/kustomize
- run: bats -v
- run: helm version
- run: github-compare -v
- run: terrafmt version
- name: output bash completion
run: aqua completion bash
- name: output zsh completion
run: aqua completion zsh
- name: output fish completion
run: aqua completion fish
- name: Test aqua g -i
run: aqua g -i suzuki-shunsuke/[email protected] suzuki-shunsuke/[email protected] suzuki-shunsuke/[email protected]
working-directory: tests/insert
- name: compare aqua.yaml and expect.yaml
run: diff aqua.yaml expect.yaml
working-directory: tests/insert
- name: Test version_expr readFile
run: aqua which -v terraform
working-directory: tests/version_expr_file
- name: Test version_expr readJSON
run: aqua which -v terraform
working-directory: tests/version_expr_json
- name: Test version_expr readYAML
run: aqua which -v terraform
working-directory: tests/version_expr_yaml
- run: aqua g -i suzuki-shunsuke/tfcmt
working-directory: tests/main
- name: add duplicated package
run: aqua g -i suzuki-shunsuke/tfcmt
working-directory: tests/main
- run: git diff aqua.yaml
working-directory: tests/main
- name: "Test generate-registry"
run: aqua gr suzuki-shunsuke/mkghtag
- name: Test generate-registry (specify version)
run: aqua gr suzuki-shunsuke/[email protected]
- name: test aqua cp
run: aqua cp actionlint
- name: test aqua cp
run: dist/actionlint -version
- name: test aqua cp
run: aqua cp
- name: test aqua cp -a
run: aqua cp -a
- name: test tags
run: aqua i
working-directory: tests/tag
- name: test tags
run: aqua i -t test
working-directory: tests/tag
- name: test tags
run: aqua i -t foo,bar
working-directory: tests/tag
- name: test tags
run: aqua i --exclude-tags test
working-directory: tests/tag
- name: test tags
run: aqua i --exclude-tags test -t foo
working-directory: tests/tag
- name: test tags
run: aqua cp
working-directory: tests/tag
- name: test tags
run: aqua cp -t test
working-directory: tests/tag
- name: test tags
run: aqua cp -t foo,bar
working-directory: tests/tag
- name: test tags
run: aqua cp --exclude-tags test
working-directory: tests/tag
- name: test tags
run: aqua cp --exclude-tags test -t foo
working-directory: tests/tag
- name: update only registrires
run: |
aqua update -r
git diff .
git checkout -- .
working-directory: tests/update
- name: update only packages
run: |
aqua up -p
git diff .
git checkout -- .
working-directory: tests/update
- name: update all registries and packages
run: |
aqua update
git diff .
git checkout -- .
working-directory: tests/update
- name: update only specific command
run: |
aqua update tfcmt ci-info
git diff .
git checkout -- .
working-directory: tests/update
- run: aqua update-checksum -a
- run: terraform --help
- run: terrafmt --help
- name: Test rm
# http - terraform
# go_install - terrafmt
run: aqua rm x-motemen/ghq bats-core/bats-core terraform terrafmt
- name: Remove not found package
run: aqua rm Builditluc/wiki-tui
- name: Remove not found command
run: aqua rm wiki-tui
- name: Test rm -m l
run: aqua rm -m l ghcp
- name: Test rm -m lp
run: aqua rm -m lp ghcp reviewdog
- name: Test rm --all
run: aqua rm -a
# Test if global configuration files are read in `aqua list` and `aqua g`
- run: aqua list
working-directory: /tmp
- name: Test update-aqua
run: aqua update-aqua
integration-test-cargo:
timeout-minutes: 30
runs-on: ubuntu-latest
permissions: {}
env:
AQUA_LOG_COLOR: always
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
persist-credentials: false
- uses: actions/setup-go@3041bf56c941b39c61721a86cd11f3bb1338122a # v5.2.0
with:
go-version-file: go.mod
cache: true
- run: go install ./cmd/aqua
- run: echo "${XDG_DATA_HOME:-$HOME/.local/share}/aquaproj-aqua/bin" >> "$GITHUB_PATH"
- run: aqua policy allow
- name: Test the package type "cargo"
run: aqua i
working-directory: tests/cargo
env:
GITHUB_TOKEN: ${{github.token}}
- name: Test search versions of the package type "cargo"
run: aqua g crates.io/eza
working-directory: tests/cargo
env:
GITHUB_TOKEN: ${{github.token}}
- name: Test aqua gr cargo
run: aqua gr crates.io/skim
env:
GITHUB_TOKEN: ${{github.token}}
integration-test-all-envs:
timeout-minutes: 30
runs-on: ${{ matrix.env.runs-on }}
permissions: {}
strategy:
matrix:
env:
- runs-on: windows-latest
- runs-on: ubuntu-24.04
- runs-on: macos-13
- runs-on: macos-14
env:
AQUA_LOG_COLOR: always
AQUA_GLOBAL_CONFIG: ${{ github.workspace }}/tests/main/aqua-global.yaml:${{ github.workspace }}/tests/main/aqua-global-2.yaml
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
persist-credentials: false
- uses: actions/setup-go@3041bf56c941b39c61721a86cd11f3bb1338122a # v5.2.0
with:
go-version-file: go.mod
cache: true
- run: go install ./cmd/aqua
- run: echo "${XDG_DATA_HOME:-$HOME/.local/share}/aquaproj-aqua/bin" >> "$GITHUB_PATH"
- run: aqua policy allow
- name: Test minisign
run: aqua i
working-directory: tests/minisign
- name: test Cosign, SLSA, and GitHub Artifact Attestations
run: aqua i
working-directory: tests/cosign
env:
GH_DEBUG: "1"
GITHUB_TOKEN: ${{github.token}} # gh attestation verify requires a GitHub access token