Skip to content

Commit

Permalink
[chore] Update go versions in workflows to latest (open-telemetry#26485)
Browse files Browse the repository at this point in the history
**Description:** This is a defensive PR to update the go versions used
in workflows to use the latest patch versions of `v1.21` and `v1.20`.
The latest patch releases contains security related fixes.
  • Loading branch information
bryan-aguilar authored Sep 6, 2023
1 parent 56e93a9 commit 8480349
Show file tree
Hide file tree
Showing 10 changed files with 23 additions and 23 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build-and-test-windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ jobs:
run: Install-WindowsFeature -name Web-Server -IncludeManagementTools
- uses: actions/setup-go@v4
with:
go-version: ~1.20.7
go-version: ~1.20.8
cache: false
- name: Cache Go
id: go-mod-cache
Expand Down
24 changes: 12 additions & 12 deletions .github/workflows/build-and-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ jobs:
- uses: actions/checkout@v4
- uses: actions/setup-go@v4
with:
go-version: ~1.20.7
go-version: ~1.20.8
cache: false
- name: Cache Go
id: go-cache
Expand Down Expand Up @@ -141,7 +141,7 @@ jobs:
- name: Setup Go
uses: actions/setup-go@v4
with:
go-version: ~1.20.7
go-version: ~1.20.8
cache: false
- name: Cache Go
id: go-cache
Expand All @@ -164,7 +164,7 @@ jobs:
- uses: actions/checkout@v4
- uses: actions/setup-go@v4
with:
go-version: ~1.20.7
go-version: ~1.20.8
cache: false
- name: Cache Go
id: go-cache
Expand Down Expand Up @@ -224,7 +224,7 @@ jobs:
unittest-matrix:
strategy:
matrix:
go-version: ["1.21", "1.20"] # 1.20 is interpreted as 1.2 without quotes
go-version: ["~1.21.1", "~1.20.8"] # 1.20 is interpreted as 1.2 without quotes
group:
- receiver-0
- receiver-1
Expand Down Expand Up @@ -265,13 +265,13 @@ jobs:
path: ~/.cache/go-build
key: go-test-build-${{ runner.os }}-${{ matrix.go-version }}-${{ hashFiles('**/go.sum') }}
- name: Run Unit Tests
if: ${{ matrix.go-version == '1.19' }}
if: startsWith( matrix.go-version, '1.19' )
run: make gotest GROUP=${{ matrix.group }}
- name: Run Unit Tests With Coverage
if: ${{ matrix.go-version == '1.20' }} # only run coverage on one version
if: startsWith( matrix.go-version, '~1.20' ) # only run coverage on one version
run: make gotest-with-cover GROUP=${{ matrix.group }}
- uses: actions/upload-artifact@v3
if: ${{ matrix.go-version == '1.20' }} # only run coverage on one version
if: startsWith( matrix.go-version, '~1.20' ) # only run coverage on one version
with:
name: coverage-artifacts
path: ${{ matrix.group }}-coverage.txt
Expand Down Expand Up @@ -316,7 +316,7 @@ jobs:
- uses: actions/checkout@v4
- uses: actions/setup-go@v4
with:
go-version: ~1.20.7
go-version: ~1.20.8
cache: false
- name: Cache Go
id: go-cache
Expand All @@ -337,7 +337,7 @@ jobs:
- uses: actions/checkout@v4
- uses: actions/setup-go@v4
with:
go-version: ~1.20.7
go-version: ~1.20.8
cache: false
- name: Cache Go
id: go-cache
Expand All @@ -363,7 +363,7 @@ jobs:
- uses: actions/checkout@v4
- uses: actions/setup-go@v4
with:
go-version: ~1.20.7
go-version: ~1.20.8
cache: false
- name: Cache Go
id: go-cache
Expand Down Expand Up @@ -427,7 +427,7 @@ jobs:
- uses: actions/checkout@v4
- uses: actions/setup-go@v4
with:
go-version: ~1.20.7
go-version: ~1.20.8
cache: false
- name: Cache Go
id: go-cache
Expand Down Expand Up @@ -559,7 +559,7 @@ jobs:
- uses: actions/checkout@v4
- uses: actions/setup-go@v4
with:
go-version: ~1.20.7
go-version: ~1.20.8
cache: false
- name: Mkdir bin and dist
run: |
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/changelog.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ jobs:
fetch-depth: 0
- uses: actions/setup-go@v4
with:
go-version: ~1.20.7
go-version: ~1.20.8
cache: false
- name: Cache Go
id: go-cache
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
- uses: actions/checkout@v4
- uses: actions/setup-go@v4
with:
go-version: ~1.20.7
go-version: ~1.20.8
cache: false

# Initializes the CodeQL tools for scanning.
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/create-dependabot-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
run: sudo apt-get update; sudo apt-get install zsh
- uses: actions/setup-go@v4
with:
go-version: ~1.20.7
go-version: ~1.20.8
cache: false
- name: Run dependabot-pr.sh
run: ./.github/workflows/scripts/dependabot-pr.sh
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/e2e-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
uses: actions/checkout@v4
- uses: actions/setup-go@v4
with:
go-version: ~1.20.7
go-version: ~1.20.8
cache: false
- name: Cache Go
id: go-cache
Expand Down Expand Up @@ -56,7 +56,7 @@ jobs:
- uses: actions/checkout@v4
- uses: actions/setup-go@v4
with:
go-version: ~1.20.7
go-version: ~1.20.8
cache: false
- name: Cache Go
id: go-cache
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/load-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ jobs:
- uses: actions/checkout@v4
- uses: actions/setup-go@v4
with:
go-version: ~1.20.7
go-version: ~1.20.8
cache: false
- name: Cache Go
id: go-cache
Expand Down Expand Up @@ -65,7 +65,7 @@ jobs:
- uses: actions/checkout@v4
- uses: actions/setup-go@v4
with:
go-version: ~1.20.7
go-version: ~1.20.8
cache: false
- name: Cache Go
id: go-cache
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/prepare-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ jobs:
path: opentelemetry-collector-contrib
- uses: actions/setup-go@v4
with:
go-version: ~1.20.7
go-version: ~1.20.8
cache: false
- name: Prepare release for contrib
working-directory: opentelemetry-collector-contrib
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/prometheus-compliance-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ jobs:
path: opentelemetry-collector-contrib
- uses: actions/setup-go@v4
with:
go-version: ~1.20.7
go-version: ~1.20.8
cache: false
- name: Cache Go
id: go-cache
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/tidy-dependencies.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ jobs:
token: ${{ secrets.OPENTELEMETRYBOT_GITHUB_TOKEN }}
- uses: actions/setup-go@v4
with:
go-version: ~1.20.7
go-version: ~1.20.8
cache: false
- name: Cache Go
id: go-cache
Expand Down

0 comments on commit 8480349

Please sign in to comment.