Skip to content

Commit

Permalink
ci: Use Consul Go version for Vault int tests
Browse files Browse the repository at this point in the history
Unlike the Nomad tests (where Nomad is compiled from source and provides
the tests), Vault is installed as a binary, and local Consul tests are
run.

Fixes incorrect version change introduced in #20058.
  • Loading branch information
zalimeni committed Jan 16, 2024
1 parent 6c65351 commit 39c5be1
Showing 1 changed file with 7 additions and 12 deletions.
19 changes: 7 additions & 12 deletions .github/workflows/test-integrations.yml
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,6 @@ jobs:
runs-on: ${{ fromJSON(needs.setup.outputs.compute-large) }}
needs:
- setup
- get-go-version
- dev-build
permissions:
id-token: write # NOTE: this permission is explicitly required for Vault auth.
Expand All @@ -95,7 +94,7 @@ jobs:
repository: hashicorp/nomad
ref: ${{ matrix.nomad-version }}

- name: Install Go (Nomad build)
- name: Install Go
uses: actions/setup-go@fac708d6674e30b6ba41289acaab6d4b75aa0753 # v4.0.1
with:
# Do not explicitly set Go version here, as it should depend on what Nomad declares.
Expand All @@ -114,11 +113,6 @@ jobs:
- name: Make Nomad dev build
run: make pkg/linux_amd64/nomad

- name: Install Go (Consul tests)
uses: actions/setup-go@fac708d6674e30b6ba41289acaab6d4b75aa0753 # v4.0.1
with:
go-version: ${{ needs.get-go-version.outputs.go-version }}

- name: Run integration tests
run: |
go install gotest.tools/gotestsum@v${{env.GOTESTSUM_VERSION}} && \
Expand Down Expand Up @@ -183,17 +177,18 @@ jobs:
if: ${{ endsWith(github.repository, '-enterprise') }}
run: git config --global url."https://${{ secrets.ELEVATED_GITHUB_TOKEN }}:@github.com".insteadOf "https://github.com"

- uses: actions/setup-go@fac708d6674e30b6ba41289acaab6d4b75aa0753 # v4.0.1
with:
# We use the current Consul Go version here since Vault is installed as a binary
# and tests are run from the Consul repo.
go-version: ${{ needs.get-go-version.outputs.go-version }}

- name: Install Vault
run: |
wget -q -O /tmp/vault.zip "https://releases.hashicorp.com/vault/${{ env.VAULT_BINARY_VERSION }}/vault_${{ env.VAULT_BINARY_VERSION }}_linux_amd64.zip"
unzip -d /tmp /tmp/vault.zip
echo "/tmp" >> $GITHUB_PATH
- name: Install Go (Consul tests)
uses: actions/setup-go@fac708d6674e30b6ba41289acaab6d4b75aa0753 # v4.0.1
with:
go-version: ${{ needs.get-go-version.outputs.go-version }}

- name: Run Connect CA Provider Tests
run: |
mkdir -p "${{ env.TEST_RESULTS_DIR }}"
Expand Down

0 comments on commit 39c5be1

Please sign in to comment.