Skip to content

Commit 829dc6b

Browse files
committed
ci: modernize go.yml
1. Bump actions/setup-go and actions/checkout versions. 2. Merge build-minimum step into build as the only difference between those is go version used, and it can be placed into matrix. Signed-off-by: Kir Kolyshkin <[email protected]>
1 parent 7d375ec commit 829dc6b

File tree

1 file changed

+3
-27
lines changed

1 file changed

+3
-27
lines changed

.github/workflows/go.yml

Lines changed: 3 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -8,24 +8,20 @@ on:
88
permissions:
99
contents: read
1010

11-
env:
12-
# Minimum supported Go toolchain
13-
ACTION_MINIMUM_TOOLCHAIN: "1.12.x"
14-
1511
jobs:
1612
build:
1713
name: "Build"
1814
runs-on: ubuntu-latest
1915
strategy:
2016
matrix:
21-
go: ['1.17.x', '1.18.x', '1.19.x', '1.20.x']
17+
go: ['1.12.x', '1.23.x', '1.24.x']
2218
steps:
2319
- run: sudo apt-get -qq update
2420
- name: Install libsystemd-dev
2521
run: sudo apt-get install libsystemd-dev
26-
- uses: actions/checkout@v3
22+
- uses: actions/checkout@v4
2723
- name: Setup go
28-
uses: actions/setup-go@v4
24+
uses: actions/setup-go@v5
2925
with:
3026
go-version: ${{ matrix.go }}
3127
- name: Go fmt
@@ -36,23 +32,3 @@ jobs:
3632
run: ./scripts/ci-runner.sh build_tests
3733
- name: Go vet
3834
run: ./scripts/ci-runner.sh go_vet
39-
build-minimum:
40-
name: "Build on minimum supported toolchain"
41-
runs-on: ubuntu-latest
42-
steps:
43-
- run: sudo apt-get -qq update
44-
- name: Install libsystemd-dev
45-
run: sudo apt-get install libsystemd-dev
46-
- uses: actions/checkout@v3
47-
- name: Setup go
48-
uses: actions/setup-go@v4
49-
with:
50-
go-version: ${{ env['ACTION_MINIMUM_TOOLCHAIN'] }}
51-
- name: Go fmt
52-
run: ./scripts/ci-runner.sh go_fmt
53-
- name: Go build (source)
54-
run: ./scripts/ci-runner.sh build_source
55-
- name: Go build (tests)
56-
run: ./scripts/ci-runner.sh build_tests
57-
- name: Go vet
58-
run: ./scripts/ci-runner.sh go_vet

0 commit comments

Comments
 (0)