Skip to content

Commit

Permalink
Detect Go version for integration tests
Browse files Browse the repository at this point in the history
  • Loading branch information
jamlo committed Oct 16, 2024
1 parent d1c4ee6 commit b411ed5
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions .github/workflows/testcontainers-integration-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,19 @@ jobs:
steps:
- uses: actions/checkout@v3

# Detect Go version from test_integration/go.mod
- name: Detect Go version from test_integration/go.mod
id: detect-test-go-version
run: |
go_version=$(grep '^go ' test_integration/go.mod | awk '{print $2}')
echo "Go version detected for integration tests: $go_version"
echo "GOLANG_TEST_VERSION=$go_version" >> $GITHUB_ENV
- name: Set up Go
uses: actions/setup-go@v4
uses: actions/setup-go@v5
with:
go-version: '1.23'
go-version: ${{ env.GOLANG_TEST_VERSION }}
cache: true

- name: Run Go tests in integration test directory
run: |
Expand Down

0 comments on commit b411ed5

Please sign in to comment.