Skip to content

Commit

Permalink
ci: fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
suzuki-shunsuke committed Sep 23, 2024
1 parent 710ea03 commit 57e668e
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 113 deletions.
116 changes: 3 additions & 113 deletions .github/workflows/wc-integration-test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ jobs:
permissions: {}
env:
GITHUB_TOKEN: ${{github.token}}
AQUA_LOG_LEVEL: debug
AQUA_LOG_COLOR: always
AQUA_GLOBAL_CONFIG: ${{ github.workspace }}/tests/main/aqua-global.yaml:${{ github.workspace }}/tests/main/aqua-global-2.yaml
steps:
Expand All @@ -18,36 +17,17 @@ jobs:
go-version-file: go.mod
cache: true

- uses: suzuki-shunsuke/github-token-action@350d7506222e3a0016491abe85b5c4dd475b67d1 # v0.2.1
id: token
with:
github_app_id: ${{secrets.APP_ID}}
github_app_private_key: ${{secrets.APP_PRIVATE_KEY}}
default_github_token: ${{github.token}}

- 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 -
env:
GITHUB_TOKEN: ${{steps.token.outputs.token}}
- run: echo "x-motemen/ghq" | aqua g -f -
env:
GITHUB_TOKEN: ${{steps.token.outputs.token}}
- run: echo "local,aquaproj/aqua-installer" | aqua -c tests/main/aqua-global.yaml g -f -
env:
GITHUB_TOKEN: ${{steps.token.outputs.token}}
- run: aqua g x-motemen/ghq aquaproj/aqua-installer
env:
GITHUB_TOKEN: ${{steps.token.outputs.token}}
- run: echo cli/cli | aqua g -f - x-motemen/ghq aquaproj/aqua-installer suzuki-shunsuke/[email protected]
env:
GITHUB_TOKEN: ${{steps.token.outputs.token}}
- name: Test -pin
run: aqua g --pin cli/cli suzuki-shunsuke/[email protected]
env:
GITHUB_TOKEN: ${{steps.token.outputs.token}}
- name: Test g -g
run: aqua g -g cli/cli
env:
Expand All @@ -56,14 +36,10 @@ jobs:
- name: Test checksum
run: aqua -c aqua.yaml i
working-directory: tests/3064
env:
GITHUB_TOKEN: ${{github.token}}

- name: Test version_prefix
run: aqua -c aqua.yaml g -i kubernetes-sigs/kustomize
working-directory: tests/main
env:
GITHUB_TOKEN: ${{steps.token.outputs.token}}

- run: aqua list
- run: aqua list -installed
Expand All @@ -88,55 +64,25 @@ jobs:
run: aqua which -v cosign
- run: kind version
working-directory: tests/main
env:
GITHUB_TOKEN: ${{steps.token.outputs.token}}
- run: kind version
env:
GITHUB_TOKEN: ${{steps.token.outputs.token}}
- run: restic version
env:
AQUA_PROGRESS_BAR: "true"
GITHUB_TOKEN: ${{steps.token.outputs.token}}
- run: migrate -version
env:
GITHUB_TOKEN: ${{steps.token.outputs.token}}
- run: ghq -version
env:
GITHUB_TOKEN: ${{steps.token.outputs.token}}
- run: gh version
env:
GITHUB_TOKEN: ${{steps.token.outputs.token}}
- run: tfenv --version
env:
GITHUB_TOKEN: ${{steps.token.outputs.token}}
- run: aqua -c tests/main/aqua-global.yaml g local,kubernetes-sigs/kustomize
env:
GITHUB_TOKEN: ${{steps.token.outputs.token}}
- run: bats -v
env:
GITHUB_TOKEN: ${{steps.token.outputs.token}}
- run: helm version
env:
GITHUB_TOKEN: ${{steps.token.outputs.token}}
- run: github-compare -v
env:
GITHUB_TOKEN: ${{steps.token.outputs.token}}
- run: terrafmt version
env:
GITHUB_TOKEN: ${{steps.token.outputs.token}}


- name: test cosign
run: aqua i
working-directory: tests/cosign
env:
GITHUB_TOKEN: ${{steps.token.outputs.token}}

- name: test SLSA
run: aqua i
working-directory: tests/slsa
env:
GITHUB_TOKEN: ${{steps.token.outputs.token}}

- name: output bash completion
run: aqua completion bash
Expand All @@ -147,91 +93,57 @@ jobs:

- run: aqua g -i suzuki-shunsuke/tfcmt
working-directory: tests/main
env:
GITHUB_TOKEN: ${{steps.token.outputs.token}}
- name: add duplicated package
run: aqua g -i suzuki-shunsuke/tfcmt
working-directory: tests/main
env:
GITHUB_TOKEN: ${{steps.token.outputs.token}}
- run: git diff aqua.yaml
working-directory: tests/main

- name: "Test generate-registry"
run: aqua gr suzuki-shunsuke/mkghtag
env:
GITHUB_TOKEN: ${{steps.token.outputs.token}}
- name: Test generate-registry (specify version)
run: aqua gr suzuki-shunsuke/[email protected]
env:
GITHUB_TOKEN: ${{steps.token.outputs.token}}

- name: test aqua cp
run: aqua cp actionlint
env:
GITHUB_TOKEN: ${{steps.token.outputs.token}}
- name: test aqua cp
run: dist/actionlint -version
- name: test aqua cp
run: aqua cp
env:
GITHUB_TOKEN: ${{steps.token.outputs.token}}
- name: test aqua cp -a
run: aqua cp -a
env:
GITHUB_TOKEN: ${{steps.token.outputs.token}}

- name: test tags
run: aqua i
working-directory: tests/tag
env:
GITHUB_TOKEN: ${{steps.token.outputs.token}}
- name: test tags
run: aqua i -t test
working-directory: tests/tag
env:
GITHUB_TOKEN: ${{steps.token.outputs.token}}
- name: test tags
run: aqua i -t foo,bar
working-directory: tests/tag
env:
GITHUB_TOKEN: ${{steps.token.outputs.token}}
- name: test tags
run: aqua i --exclude-tags test
working-directory: tests/tag
env:
GITHUB_TOKEN: ${{steps.token.outputs.token}}
- name: test tags
run: aqua i --exclude-tags test -t foo
working-directory: tests/tag
env:
GITHUB_TOKEN: ${{steps.token.outputs.token}}

- name: test tags
run: aqua cp
working-directory: tests/tag
env:
GITHUB_TOKEN: ${{steps.token.outputs.token}}
- name: test tags
run: aqua cp -t test
working-directory: tests/tag
env:
GITHUB_TOKEN: ${{steps.token.outputs.token}}
- name: test tags
run: aqua cp -t foo,bar
working-directory: tests/tag
env:
GITHUB_TOKEN: ${{steps.token.outputs.token}}
- name: test tags
run: aqua cp --exclude-tags test
working-directory: tests/tag
env:
GITHUB_TOKEN: ${{steps.token.outputs.token}}
- name: test tags
run: aqua cp --exclude-tags test -t foo
working-directory: tests/tag
env:
GITHUB_TOKEN: ${{steps.token.outputs.token}}

- name: update only registrires
run: |
Expand All @@ -246,30 +158,22 @@ jobs:
git diff .
git checkout -- .
working-directory: tests/update
env:
GITHUB_TOKEN: ${{steps.token.outputs.token}}

- name: update all registries and packages
run: |
aqua update
git diff .
git checkout -- .
working-directory: tests/update
env:
GITHUB_TOKEN: ${{steps.token.outputs.token}}

- name: update only specific command
run: |
aqua update tfcmt ci-info
git diff .
git checkout -- .
working-directory: tests/update
env:
GITHUB_TOKEN: ${{steps.token.outputs.token}}

- run: aqua update-checksum -a
env:
GITHUB_TOKEN: ${{steps.token.outputs.token}}

- run: terraform --help
- run: terrafmt --help
Expand All @@ -296,16 +200,13 @@ jobs:

- name: Test update-aqua
run: aqua update-aqua
env:
GITHUB_TOKEN: ${{steps.token.outputs.token}}

integration-test-cargo:
timeout-minutes: 30
runs-on: ubuntu-latest
permissions: {}
env:
GITHUB_TOKEN: ${{github.token}}
AQUA_LOG_LEVEL: debug
AQUA_LOG_COLOR: always
steps:
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
Expand All @@ -314,26 +215,15 @@ jobs:
go-version-file: go.mod
cache: true

- uses: suzuki-shunsuke/github-token-action@350d7506222e3a0016491abe85b5c4dd475b67d1 # v0.2.1
id: token
with:
github_app_id: ${{secrets.APP_ID}}
github_app_private_key: ${{secrets.APP_PRIVATE_KEY}}
default_github_token: ${{github.token}}

- 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: sk --version
env:
GITHUB_TOKEN: ${{steps.token.outputs.token}}
working-directory: tests/cargo
- name: Test search versions of the package type "cargo"
run: aqua -c tests/main/aqua-global.yaml g local,crates.io/skim
env:
GITHUB_TOKEN: ${{steps.token.outputs.token}}
run: aqua g crates.io/eza
working-directory: tests/cargo
- name: Test aqua gr cargo
run: aqua gr crates.io/skim
env:
GITHUB_TOKEN: ${{steps.token.outputs.token}}
13 changes: 13 additions & 0 deletions tests/cargo/aqua.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
---
# aqua - Declarative CLI Version Manager
# https://aquaproj.github.io/
# checksum:
# enabled: true
# require_checksum: true
# supported_envs:
# - all
registries:
- type: standard
ref: v4.223.1 # renovate: depName=aquaproj/aqua-registry
packages:
- name: crates.io/[email protected]

0 comments on commit 57e668e

Please sign in to comment.