Skip to content

Commit 03b5aa0

Browse files
committed
ci: add build + lint
1 parent 7b4c2f9 commit 03b5aa0

File tree

1 file changed

+44
-0
lines changed

1 file changed

+44
-0
lines changed

.github/workflows/ci.yaml

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
name: ci
2+
3+
on:
4+
pull_request:
5+
branches: [ main ]
6+
push:
7+
branches: [ main ]
8+
9+
permissions:
10+
contents: write
11+
12+
jobs:
13+
lint:
14+
runs-on: ubuntu-latest
15+
steps:
16+
- name: Checkout
17+
uses: actions/checkout@v4
18+
- name: Set up Go
19+
uses: actions/setup-go@v5
20+
with:
21+
go-version: stable
22+
cache-dependency-path: |
23+
go.sum
24+
_tools/*.go.sum
25+
- name: Install golangci-lint
26+
run: |
27+
bin/golangci-lint version
28+
- name: Lint
29+
run: |
30+
bin/golangci-lint run --out-format=colored-line-number
31+
build:
32+
runs-on: ubuntu-latest
33+
steps:
34+
- name: Checkout
35+
uses: actions/checkout@v4
36+
- name: Set up Go
37+
uses: actions/setup-go@v5
38+
with:
39+
go-version: stable
40+
cache-dependency-path: |
41+
go.sum
42+
_tools/*.go.sum
43+
- name: Build
44+
run: go build -v ./...

0 commit comments

Comments
 (0)