Skip to content

Commit

Permalink
Use go version from go.mod in workflow go setup
Browse files Browse the repository at this point in the history
  • Loading branch information
williammartin committed Apr 3, 2024
1 parent 3877dfa commit e617f4d
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 14 deletions.
10 changes: 5 additions & 5 deletions .github/workflows/codeql-analysis.yml
Expand Up @@ -18,16 +18,16 @@ jobs:
- name: Checkout repository
uses: actions/checkout@v4

- name: Setup go
uses: actions/setup-go@v5
with:
go-version-file: 'go.mod'

- name: Initialize CodeQL
uses: github/codeql-action/init@v2
with:
languages: go
queries: security-and-quality

- name: Setup go
uses: actions/setup-go@v5
with:
go-version: '1.22'

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v2
8 changes: 4 additions & 4 deletions .github/workflows/lint.yml
Expand Up @@ -7,13 +7,13 @@ jobs:
runs-on: ubuntu-latest

steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Set up Go
uses: actions/setup-go@v3
with:
go-version: "1.22"

- name: Checkout repository
uses: actions/checkout@v4
go-version-file: 'go.mod'

- name: Check dependencies
run: |
Expand Down
9 changes: 4 additions & 5 deletions .github/workflows/test.yml
Expand Up @@ -8,18 +8,17 @@ jobs:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
go: ["1.22"]

runs-on: ${{ matrix.os }}

steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Set up Go
uses: actions/setup-go@v3
with:
go-version: ${{ matrix.go }}

- name: Checkout repository
uses: actions/checkout@v4
go-version-file: 'go.mod'

- name: Run tests
run: go test -v ./...

0 comments on commit e617f4d

Please sign in to comment.