Skip to content

Commit f57ff65

Browse files
committed
dev: rename and split workflow files
1 parent 1400552 commit f57ff65

File tree

4 files changed

+107
-79
lines changed

4 files changed

+107
-79
lines changed
File renamed without changes.

Diff for: .github/workflows/pr-checks.yml

+107
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,107 @@
1+
name: CI
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+
# Checks: GitHub action assets
32+
check-generated:
33+
runs-on: ubuntu-latest
34+
steps:
35+
- uses: actions/checkout@v4
36+
with:
37+
fetch-depth: 0
38+
- uses: actions/setup-go@v5
39+
with:
40+
go-version: ${{ env.GO_VERSION }}
41+
- name: Check generated files are up-to-date
42+
run: make fast_check_generated
43+
env:
44+
# needed for github-action-config.json generation
45+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
46+
47+
check-local-install-script:
48+
name: Installation script (local)
49+
strategy:
50+
matrix:
51+
os: [ubuntu-latest, ubuntu-24.04-arm, macos-latest, windows-latest]
52+
runs-on: ${{ matrix.os }}
53+
steps:
54+
- uses: actions/checkout@v4
55+
- name: Check installation script
56+
run: cat ./install.sh | sh -s -- -d -b "./install-golangci-lint"
57+
58+
# Note: the command `run` is tested by the other workflows (`make test`).
59+
check-commands:
60+
runs-on: ubuntu-latest
61+
steps:
62+
- uses: actions/checkout@v4
63+
- uses: actions/setup-go@v5
64+
with:
65+
go-version: ${{ env.GO_VERSION }}
66+
- name: Build golangci-lint
67+
run: make build
68+
69+
- run: ./golangci-lint
70+
71+
- run: ./golangci-lint fmt
72+
- run: ./golangci-lint fmt --diff
73+
74+
- run: ./golangci-lint cache
75+
- run: ./golangci-lint cache status
76+
- run: ./golangci-lint cache clean
77+
78+
- run: ./golangci-lint completion
79+
- run: ./golangci-lint completion bash
80+
- run: ./golangci-lint completion bash --no-descriptions
81+
- run: ./golangci-lint completion zsh
82+
- run: ./golangci-lint completion zsh --no-descriptions
83+
- run: ./golangci-lint completion fish
84+
- run: ./golangci-lint completion fish --no-descriptions
85+
- run: ./golangci-lint completion powershell
86+
- run: ./golangci-lint completion powershell --no-descriptions
87+
88+
- run: ./golangci-lint config
89+
- run: ./golangci-lint config path
90+
- run: ./golangci-lint config path --json
91+
# TODO(ldez) after v2: golangci.next.jsonschema.json -> golangci.jsonschema.json
92+
- run: ./golangci-lint config verify --schema jsonschema/golangci.next.jsonschema.json
93+
94+
- run: ./golangci-lint help
95+
- run: ./golangci-lint help linters
96+
- run: ./golangci-lint help linters --json
97+
- run: ./golangci-lint help formatters
98+
- run: ./golangci-lint help formatters --json
99+
- run: ./golangci-lint linters
100+
- run: ./golangci-lint linters --json
101+
- run: ./golangci-lint formatters
102+
- run: ./golangci-lint formatters --json
103+
- run: ./golangci-lint version
104+
- run: ./golangci-lint version --short
105+
- run: ./golangci-lint version --debug
106+
- run: ./golangci-lint version --json
107+
- run: ./golangci-lint version --json --debug

Diff for: .github/workflows/pr.yml

-79
Original file line numberDiff line numberDiff line change
@@ -87,82 +87,3 @@ jobs:
8787
go-version: ${{ matrix.golang }}
8888
- name: Run tests
8989
run: make test
90-
91-
# Checks: GitHub action assets
92-
check_generated:
93-
runs-on: ubuntu-latest
94-
steps:
95-
- uses: actions/checkout@v4
96-
with:
97-
fetch-depth: 0
98-
- uses: actions/setup-go@v5
99-
with:
100-
go-version: ${{ env.GO_VERSION }}
101-
- name: Check generated files are up-to-date
102-
run: make fast_check_generated
103-
env:
104-
# needed for github-action-config.json generation
105-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
106-
107-
check-local-install-script:
108-
name: Installation script (local)
109-
strategy:
110-
matrix:
111-
os: [ubuntu-latest, ubuntu-24.04-arm, macos-latest, windows-latest]
112-
runs-on: ${{ matrix.os }}
113-
steps:
114-
- uses: actions/checkout@v4
115-
- name: Check installation script
116-
run: cat ./install.sh | sh -s -- -d -b "./install-golangci-lint"
117-
118-
# Note: the command `run` is tested by the previous steps (`make test`).
119-
commands:
120-
needs: golangci-lint
121-
runs-on: ubuntu-latest
122-
steps:
123-
- uses: actions/checkout@v4
124-
- uses: actions/setup-go@v5
125-
with:
126-
go-version: ${{ env.GO_VERSION }}
127-
- name: Build golangci-lint
128-
run: make build
129-
130-
- run: ./golangci-lint
131-
132-
- run: ./golangci-lint fmt
133-
- run: ./golangci-lint fmt --diff
134-
135-
- run: ./golangci-lint cache
136-
- run: ./golangci-lint cache status
137-
- run: ./golangci-lint cache clean
138-
139-
- run: ./golangci-lint completion
140-
- run: ./golangci-lint completion bash
141-
- run: ./golangci-lint completion bash --no-descriptions
142-
- run: ./golangci-lint completion zsh
143-
- run: ./golangci-lint completion zsh --no-descriptions
144-
- run: ./golangci-lint completion fish
145-
- run: ./golangci-lint completion fish --no-descriptions
146-
- run: ./golangci-lint completion powershell
147-
- run: ./golangci-lint completion powershell --no-descriptions
148-
149-
- run: ./golangci-lint config
150-
- run: ./golangci-lint config path
151-
- run: ./golangci-lint config path --json
152-
# TODO(ldez) after v2: golangci.next.jsonschema.json -> golangci.jsonschema.json
153-
- run: ./golangci-lint config verify --schema jsonschema/golangci.next.jsonschema.json
154-
155-
- run: ./golangci-lint help
156-
- run: ./golangci-lint help linters
157-
- run: ./golangci-lint help linters --json
158-
- run: ./golangci-lint help formatters
159-
- run: ./golangci-lint help formatters --json
160-
- run: ./golangci-lint linters
161-
- run: ./golangci-lint linters --json
162-
- run: ./golangci-lint formatters
163-
- run: ./golangci-lint formatters --json
164-
- run: ./golangci-lint version
165-
- run: ./golangci-lint version --short
166-
- run: ./golangci-lint version --debug
167-
- run: ./golangci-lint version --json
168-
- run: ./golangci-lint version --json --debug
File renamed without changes.

0 commit comments

Comments
 (0)