Skip to content

Commit 51befbe

Browse files
authored
Create go-ci.yaml
1 parent 7df4a17 commit 51befbe

File tree

1 file changed

+49
-0
lines changed

1 file changed

+49
-0
lines changed

.github/workflows/go-ci.yaml

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
name: Go CI
2+
3+
on:
4+
push:
5+
branches: [ main, master ]
6+
pull_request:
7+
branches: [ main, master ]
8+
9+
jobs:
10+
build-and-test:
11+
runs-on: ubuntu-latest
12+
steps:
13+
- uses: actions/checkout@v4
14+
15+
- name: Set up Go
16+
uses: actions/setup-go@v5
17+
with:
18+
go-version: '1.23'
19+
cache: true
20+
21+
- name: Build
22+
run: go build -o ./bin/pdfjuicer ./cmd
23+
24+
- name: Verify Build Output
25+
run: |
26+
if [ ! -f ./bin/pdfjuicer ]; then
27+
echo "Build failed: pdfjuicer binary not found"
28+
exit 1
29+
fi
30+
echo "Build verification successful"
31+
32+
- name: Test
33+
run: go test -v ./...
34+
35+
linter:
36+
name: lint
37+
runs-on: ubuntu-latest
38+
steps:
39+
- uses: actions/checkout@v4
40+
- uses: actions/setup-go@v5
41+
with:
42+
go-version: '1.23'
43+
cache: true
44+
45+
- name: golangci-lint
46+
uses: golangci/golangci-lint-action@v6
47+
with:
48+
version: v1.64.8
49+
args: --timeout=5m --config=.golangci.yaml

0 commit comments

Comments
 (0)