Skip to content

Commit 5881256

Browse files
committed
[+] improve "build" GHA workflow
1 parent 6522380 commit 5881256

File tree

1 file changed

+10
-60
lines changed

1 file changed

+10
-60
lines changed

.github/workflows/build.yml

Lines changed: 10 additions & 60 deletions
Original file line numberDiff line numberDiff line change
@@ -30,70 +30,20 @@ jobs:
3030
uses: actions/setup-go@v6
3131
with:
3232
go-version: '1.25'
33+
cache-dependency-path: 'go.sum'
3334

34-
- name: Cache Go modules
35-
uses: actions/cache@v4
36-
with:
37-
path: |
38-
~/.cache/go-build
39-
~/go/pkg/mod
40-
key: ${{ runner.os }}-go-1.25-${{ hashFiles('**/go.sum') }}
41-
restore-keys: |
42-
${{ runner.os }}-go-1.25-
43-
${{ runner.os }}-go-
44-
45-
- name: Download dependencies
46-
run: go mod download
35+
- name: Build
36+
run: go build ./cmd/etcd_fdw
4737

48-
- name: Verify dependencies
49-
run: go mod verify
38+
- name: GolangCI-Lint
39+
uses: golangci/golangci-lint-action@v8
40+
with:
41+
version: latest
5042

5143
- name: Run tests
5244
run: go test -v -race -coverprofile=coverage.out ./...
53-
# Note: Integration tests run via testcontainers (no separate services needed)
54-
55-
- name: Upload coverage to Codecov
56-
uses: codecov/codecov-action@v5
57-
with:
58-
file: ./coverage.out
59-
flags: unittests
60-
name: codecov-umbrella
61-
62-
build:
63-
name: Build
64-
runs-on: ubuntu-latest
65-
needs: test
6645

67-
steps:
68-
- name: Check out code
69-
uses: actions/checkout@v5
70-
71-
- name: Set up Go
72-
uses: actions/setup-go@v6
73-
with:
74-
go-version: '1.25'
75-
76-
- name: Build binary
77-
run: go build -v ./cmd/etcd_fdw
78-
79-
- name: Test binary execution
80-
run: ./etcd_fdw --version
81-
82-
lint:
83-
name: Lint
84-
runs-on: ubuntu-latest
85-
86-
steps:
87-
- name: Check out code
88-
uses: actions/checkout@v5
89-
90-
- name: Set up Go
91-
uses: actions/setup-go@v6
92-
with:
93-
go-version: '1.25'
94-
95-
- name: Run golangci-lint
96-
uses: golangci/golangci-lint-action@v8
46+
- name: Coveralls
47+
uses: coverallsapp/github-action@v2
9748
with:
98-
version: latest
99-
args: --timeout=5m
49+
file: coverage.out

0 commit comments

Comments
 (0)