Skip to content

Commit 5ae0aad

Browse files
committed
ci: Add Push checks workflow to run golangci-lint and go test
1 parent 3b962e0 commit 5ae0aad

File tree

1 file changed

+44
-0
lines changed

1 file changed

+44
-0
lines changed

.github/workflows/push_checks.yml

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
name: Push checks
2+
3+
on:
4+
push:
5+
6+
permissions:
7+
contents: read
8+
9+
env:
10+
GO_VERSION: 1.24.2
11+
GOLANGCI_LINT_VERSION: v2.1.6
12+
13+
jobs:
14+
golangci-lint:
15+
name: golangci-lint
16+
runs-on: ubuntu-latest
17+
steps:
18+
- name: Check out code
19+
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
20+
21+
- name: Set up Go
22+
uses: actions/setup-go@d35c59abb061a4a6fb18e82ac0862c26744d6ab5 # v5
23+
with:
24+
go-version: ${{ env.GO_VERSION }}
25+
26+
- name: Run golangci-lint
27+
uses: golangci/golangci-lint-action@4afd733a84b1f43292c63897423277bb7f4313a9 # v8
28+
with:
29+
version: ${{ env.GOLANGCI_LINT_VERSION }}
30+
31+
go-test:
32+
name: Go test
33+
runs-on: ubuntu-latest
34+
steps:
35+
- name: Check out code
36+
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
37+
38+
- name: Set up Go
39+
uses: actions/setup-go@d35c59abb061a4a6fb18e82ac0862c26744d6ab5 # v5
40+
with:
41+
go-version: ${{ env.GO_VERSION }}
42+
43+
- name: Go test
44+
run: go test -v ./...

0 commit comments

Comments
 (0)