Skip to content

Commit

Permalink
Matrix test go versions
Browse files Browse the repository at this point in the history
  • Loading branch information
liggitt committed Oct 14, 2024
1 parent 9aa6b5e commit 456d76c
Showing 1 changed file with 9 additions and 6 deletions.
15 changes: 9 additions & 6 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,16 +10,19 @@ jobs:

ci:
runs-on: ubuntu-latest
strategy:
matrix:
go: [ '', '1.x' ] # '' uses go.mod, 1.x uses latest go
steps:
- uses: actions/checkout@v2
with:
path: src/sigs.k8s.io/json/
path: src/sigs.k8s.io/json/

- name: Set up Go
uses: actions/setup-go@v2
uses: actions/setup-go@v3
with:
go-version: "1.x"
stable: true
go-version-file: 'src/sigs.k8s.io/json/go.mod'
go-version: ${{ matrix.go }}
check-latest: true

- name: Test
Expand All @@ -45,9 +48,9 @@ jobs:
if: github.base_ref
steps:
- name: Install Go
uses: actions/setup-go@v2
uses: actions/setup-go@v3
with:
go-version: '1.x'
go-version-file: 'src/sigs.k8s.io/json/go.mod'
- name: Add GOBIN to PATH
run: echo "$(go env GOPATH)/bin" >> $GITHUB_PATH
- name: Install dependencies
Expand Down

0 comments on commit 456d76c

Please sign in to comment.