Skip to content

Commit ffd45f6

Browse files
committed
Set go version on github actions from gowork file
1 parent 6cf7014 commit ffd45f6

File tree

1 file changed

+48
-63
lines changed

1 file changed

+48
-63
lines changed

.github/workflows/go.yml

Lines changed: 48 additions & 63 deletions
Original file line numberDiff line numberDiff line change
@@ -10,93 +10,78 @@ permissions:
1010
contents: read
1111

1212
jobs:
13-
1413
lint:
1514
name: Lint
1615
runs-on: [ubuntu-latest]
1716
steps:
18-
19-
- name: Set up Go 1.x
20-
uses: actions/setup-go@v3
21-
with:
22-
go-version: '^1.19.0'
23-
id: go
24-
2517
- name: Check out code into the Go module directory
2618
uses: actions/checkout@v3
2719
with:
2820
fetch-depth: 0
29-
21+
- name: Set up Go 1.x
22+
uses: actions/setup-go@v3
23+
with:
24+
go-version-file: go.work
25+
id: go
3026
- name: Lint
3127
run: make lint
32-
3328
- name: Verify boilerplate
3429
run: make check-license
3530

3631
test-linux:
3732
name: Test Linux
3833
runs-on: [ubuntu-latest]
3934
steps:
40-
41-
- name: Set up Go 1.x
42-
uses: actions/setup-go@v3
43-
with:
44-
go-version: '^1.19.0'
45-
id: go
46-
47-
- name: Check out code into the Go module directory
48-
uses: actions/checkout@v3
49-
50-
- name: Test all modules
51-
run: make test-unit-non-plugin
52-
env:
53-
KUSTOMIZE_DOCKER_E2E: true
35+
- name: Check out code into the Go module directory
36+
uses: actions/checkout@v3
37+
- name: Set up Go 1.x
38+
uses: actions/setup-go@v3
39+
with:
40+
go-version-file: go.work
41+
id: go
42+
- name: Test all modules
43+
run: make test-unit-non-plugin
44+
env:
45+
KUSTOMIZE_DOCKER_E2E: true
5446

5547
test-macos:
5648
name: Test MacOS
5749
runs-on: [macos-latest]
5850
steps:
59-
60-
- name: Set up Go 1.x
61-
uses: actions/setup-go@v3
62-
with:
63-
go-version: '^1.19.0'
64-
id: go
65-
66-
- name: Check out code into the Go module directory
67-
uses: actions/checkout@v3
68-
69-
- name: Test all modules
70-
run: make test-unit-non-plugin
71-
env:
72-
KUSTOMIZE_DOCKER_E2E: false # docker not installed on mac
51+
- name: Check out code into the Go module directory
52+
uses: actions/checkout@v3
53+
- name: Set up Go 1.x
54+
uses: actions/setup-go@v3
55+
with:
56+
go-version-file: go.work
57+
id: go
58+
- name: Test all modules
59+
run: make test-unit-non-plugin
60+
env:
61+
KUSTOMIZE_DOCKER_E2E: false # docker not installed on mac
7362

7463
test-windows:
7564
name: Test Windows
7665
runs-on: [windows-latest]
7766
steps:
78-
79-
- name: Set up Go 1.x
80-
uses: actions/setup-go@v3
81-
with:
82-
go-version: '^1.19.0'
83-
id: go
84-
85-
- name: Check out code into the Go module directory
86-
uses: actions/checkout@v3
87-
88-
- name: Test kyaml
89-
run: go test -cover ./...
90-
working-directory: ./kyaml
91-
92-
- name: Test cmd/config
93-
run: go test -cover ./...
94-
working-directory: ./cmd/config
95-
env:
96-
KUSTOMIZE_DOCKER_E2E: false # docker on windows not working well yet
97-
98-
# TODO (#4001): replace specific modules above with this once Windows tests are passing.
99-
#- name: Test all modules
100-
# run: make test-unit-non-plugin
101-
# env:
102-
# KUSTOMIZE_DOCKER_E2E: false # docker on windows not working well yet
67+
- name: Check out code into the Go module directory
68+
uses: actions/checkout@v3
69+
- name: Set up Go 1.x
70+
uses: actions/setup-go@v3
71+
with:
72+
go-version-file: go.work
73+
id: go
74+
- name: Test kyaml
75+
run: go test -cover ./...
76+
working-directory: ./kyaml
77+
- name: Test cmd/config
78+
run: go test -cover ./...
79+
working-directory: ./cmd/config
80+
env:
81+
KUSTOMIZE_DOCKER_E2E: false # docker on windows not working well yet
82+
83+
# TODO (#4001): replace specific modules above with this once Windows tests are passing.
84+
#- name: Test all modules
85+
# run: make test-unit-non-plugin
86+
# env:
87+
# KUSTOMIZE_DOCKER_E2E: false # docker on windows not working well yet

0 commit comments

Comments
 (0)