Skip to content

Commit d3c9b91

Browse files
authored
dev: rename and split workflow files (#5525)
1 parent a424bbe commit d3c9b91

File tree

4 files changed

+94
-66
lines changed

4 files changed

+94
-66
lines changed

.github/workflows/documentation.yml renamed to .github/workflows/deploy-documentation.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Documentation
1+
name: Deploy Documentation
22

33
on:
44
push:

.github/workflows/pr.yml renamed to .github/workflows/pr-checks.yml

+4-65
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: CI
1+
name: Checks
22
on:
33
push:
44
branches:
@@ -28,68 +28,8 @@ jobs:
2828
git diff --exit-code go.mod
2929
git diff --exit-code go.sum
3030
31-
# We already run the current golangci-lint in tests, but here we test
32-
# our GitHub action with the latest stable golangci-lint.
33-
golangci-lint:
34-
runs-on: ubuntu-latest
35-
steps:
36-
- uses: actions/checkout@v4
37-
- uses: actions/setup-go@v5
38-
with:
39-
# https://github.com/actions/setup-go#supported-version-syntax
40-
# ex:
41-
# - 1.18beta1 -> 1.18.0-beta.1
42-
# - 1.18rc1 -> 1.18.0-rc.1
43-
go-version: ${{ env.GO_VERSION }}
44-
# TODO(ldez): must add uncommented when [email protected] (with golangci-lint v2 support) will be created.
45-
# - name: lint
46-
# uses: golangci/[email protected]
47-
# with:
48-
# version: latest
49-
50-
tests-on-windows:
51-
needs: golangci-lint # run after golangci-lint action to not produce duplicated errors
52-
runs-on: windows-latest
53-
steps:
54-
- uses: actions/checkout@v4
55-
- uses: actions/setup-go@v5
56-
with:
57-
go-version: ${{ env.GO_VERSION }} # test only the latest go version to speed up CI
58-
- name: Run tests
59-
run: make.exe test
60-
61-
tests-on-macos:
62-
needs: golangci-lint # run after golangci-lint action to not produce duplicated errors
63-
runs-on: macos-latest
64-
steps:
65-
- uses: actions/checkout@v4
66-
- uses: actions/setup-go@v5
67-
with:
68-
go-version: ${{ env.GO_VERSION }} # test only the latest go version to speed up CI
69-
- name: Run tests
70-
run: make test
71-
72-
tests-on-unix:
73-
needs: golangci-lint # run after golangci-lint action to not produce duplicated errors
74-
strategy:
75-
matrix:
76-
os:
77-
- ubuntu-latest
78-
- ubuntu-24.04-arm
79-
golang:
80-
- '1.23'
81-
- '1.24'
82-
runs-on: ${{ matrix.os }}
83-
steps:
84-
- uses: actions/checkout@v4
85-
- uses: actions/setup-go@v5
86-
with:
87-
go-version: ${{ matrix.golang }}
88-
- name: Run tests
89-
run: make test
90-
9131
# Checks: GitHub action assets
92-
check_generated:
32+
check-generated:
9333
runs-on: ubuntu-latest
9434
steps:
9535
- uses: actions/checkout@v4
@@ -115,9 +55,8 @@ jobs:
11555
- name: Check installation script
11656
run: cat ./install.sh | sh -s -- -d -b "./install-golangci-lint"
11757

118-
# Note: the command `run` is tested by the previous steps (`make test`).
119-
commands:
120-
needs: golangci-lint
58+
# Note: the command `run` is tested by the other workflows (`make test`).
59+
check-commands:
12160
runs-on: ubuntu-latest
12261
steps:
12362
- uses: actions/checkout@v4

.github/workflows/pr-tests.yml

+89
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,89 @@
1+
name: Tests
2+
on:
3+
push:
4+
branches:
5+
- master
6+
- main
7+
pull_request:
8+
9+
env:
10+
# https://github.com/actions/setup-go#supported-version-syntax
11+
# ex:
12+
# - 1.18beta1 -> 1.18.0-beta.1
13+
# - 1.18rc1 -> 1.18.0-rc.1
14+
GO_VERSION: '1.24'
15+
16+
jobs:
17+
# Check if there is any dirty change for go mod tidy
18+
go-mod:
19+
runs-on: ubuntu-latest
20+
steps:
21+
- uses: actions/checkout@v4
22+
- uses: actions/setup-go@v5
23+
with:
24+
go-version: ${{ env.GO_VERSION }}
25+
- name: Check go mod
26+
run: |
27+
go mod tidy
28+
git diff --exit-code go.mod
29+
git diff --exit-code go.sum
30+
31+
# We already run the current golangci-lint in tests, but here we test
32+
# our GitHub action with the latest stable golangci-lint.
33+
golangci-lint:
34+
runs-on: ubuntu-latest
35+
steps:
36+
- uses: actions/checkout@v4
37+
- uses: actions/setup-go@v5
38+
with:
39+
# https://github.com/actions/setup-go#supported-version-syntax
40+
# ex:
41+
# - 1.18beta1 -> 1.18.0-beta.1
42+
# - 1.18rc1 -> 1.18.0-rc.1
43+
go-version: ${{ env.GO_VERSION }}
44+
# TODO(ldez): must add uncommented when [email protected] (with golangci-lint v2 support) will be created.
45+
# - name: lint
46+
# uses: golangci/[email protected]
47+
# with:
48+
# version: latest
49+
50+
tests-on-windows:
51+
needs: golangci-lint # run after golangci-lint action to not produce duplicated errors
52+
runs-on: windows-latest
53+
steps:
54+
- uses: actions/checkout@v4
55+
- uses: actions/setup-go@v5
56+
with:
57+
go-version: ${{ env.GO_VERSION }} # test only the latest go version to speed up CI
58+
- name: Run tests
59+
run: make.exe test
60+
61+
tests-on-macos:
62+
needs: golangci-lint # run after golangci-lint action to not produce duplicated errors
63+
runs-on: macos-latest
64+
steps:
65+
- uses: actions/checkout@v4
66+
- uses: actions/setup-go@v5
67+
with:
68+
go-version: ${{ env.GO_VERSION }} # test only the latest go version to speed up CI
69+
- name: Run tests
70+
run: make test
71+
72+
tests-on-unix:
73+
needs: golangci-lint # run after golangci-lint action to not produce duplicated errors
74+
strategy:
75+
matrix:
76+
os:
77+
- ubuntu-latest
78+
- ubuntu-24.04-arm
79+
golang:
80+
- '1.23'
81+
- '1.24'
82+
runs-on: ${{ matrix.os }}
83+
steps:
84+
- uses: actions/checkout@v4
85+
- uses: actions/setup-go@v5
86+
with:
87+
go-version: ${{ matrix.golang }}
88+
- name: Run tests
89+
run: make test
File renamed without changes.

0 commit comments

Comments
 (0)