Skip to content

Commit 81261dc

Browse files
committed
build: ensure compatibility for all supported Go versions
Use matrix testing to test on currently supported Go versions, including 1.19 pre-release. The `go.mod` compatibility level is also set to 1.17. Once 1.19 is released, we should bump to 1.18, as Go always supports the current version and one older, so we should stick with this as well. Signed-off-by: Milas Bowman <[email protected]>
1 parent f1f5433 commit 81261dc

File tree

2 files changed

+12
-6
lines changed

2 files changed

+12
-6
lines changed

.github/workflows/ci.yml

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,17 @@
11
on: [push, pull_request]
22
name: Continuous integration
3+
4+
permissions:
5+
contents: read
6+
37
jobs:
48
validate:
59
name: validate
610
runs-on: ubuntu-latest
711
timeout-minutes: 5
812
steps:
913
- name: Checkout
10-
uses: actions/checkout@v2
14+
uses: actions/checkout@v3
1115
- name: Lint code
1216
uses: golangci/golangci-lint-action@v2
1317
- name: Check license
@@ -16,16 +20,18 @@ jobs:
1620
test:
1721
strategy:
1822
matrix:
19-
go-version: [1.18.x]
23+
go-version: ['1.17', '1.18', '>=1.19.0-rc.2']
2024
platform: [ubuntu-latest, macos-latest, windows-latest]
2125
runs-on: ${{ matrix.platform }}
2226
timeout-minutes: 5
2327
steps:
28+
- name: Checkout code
29+
uses: actions/checkout@v3
2430
- name: Install Go
25-
uses: actions/setup-go@v2
31+
uses: actions/setup-go@v3
2632
with:
2733
go-version: ${{ matrix.go-version }}
28-
- name: Checkout code
29-
uses: actions/checkout@v2
34+
check-latest: true
35+
cache: true
3036
- name: Test
3137
run: go test ./...

go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
module github.com/compose-spec/compose-go
22

3-
go 1.18
3+
go 1.17
44

55
require (
66
github.com/distribution/distribution/v3 v3.0.0-20220725133111-4bf3547399eb

0 commit comments

Comments
 (0)