Skip to content

Commit

Permalink
ci: use primary Go version to run Nomad and Vault integration tests
Browse files Browse the repository at this point in the history
While we defer to other projects w.r.t. how they are built, we should
run our tests (and Consul code) using the current latest version we
declare.

Follow-up to #20058.
  • Loading branch information
zalimeni committed Jan 9, 2024
1 parent c6c2d8b commit 6c65351
Showing 1 changed file with 12 additions and 6 deletions.
18 changes: 12 additions & 6 deletions .github/workflows/test-integrations.yml
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,7 @@ 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 @@ -94,7 +95,7 @@ jobs:
repository: hashicorp/nomad
ref: ${{ matrix.nomad-version }}

- name: Install Go
- name: Install Go (Nomad build)
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 @@ -113,6 +114,11 @@ 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 @@ -177,17 +183,17 @@ 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:
# Do not explicitly set Go version here, as it should depend on what Vault declares.
go-version-file: 'go.mod'

- 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 6c65351

Please sign in to comment.