Skip to content

Commit 294cc5b

Browse files
committed
ci: consolidate CI workflow into single build job
- Merge test, coverage, and lint jobs into unified build job - Switch from go test to ginkgo for test execution - Remove artifact upload/download between jobs - Simplify workflow by eliminating job dependencies - Move release-please into main build job Signed-off-by: Svetlin Ralchev <iamralch@users.noreply.github.com>
1 parent d766c23 commit 294cc5b

2 files changed

Lines changed: 13 additions & 51 deletions

File tree

‎.github/workflows/ci.yml‎

Lines changed: 2 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,7 @@ permissions:
1111
pull-requests: write
1212
checks: write
1313
jobs:
14-
test:
15-
name: Test
14+
build:
1615
runs-on: ubuntu-latest
1716
steps:
1817
- name: Checkout code
@@ -25,51 +24,15 @@ jobs:
2524
- name: Download dependencies
2625
run: go mod download
2726
- name: Run tests with coverage
28-
run: go test -v -race -coverprofile=coverage.out -covermode=atomic ./...
29-
- name: Upload coverage to artifacts
30-
uses: actions/upload-artifact@v5
31-
with:
32-
name: coverage
33-
path: coverage.out
34-
coverage:
35-
name: Code Coverage
36-
runs-on: ubuntu-latest
37-
needs: test
38-
if: github.event_name == 'pull_request'
39-
steps:
40-
- name: Checkout code
41-
uses: actions/checkout@v4
42-
with:
43-
fetch-depth: 0
44-
- name: Download coverage
45-
uses: actions/download-artifact@v4
46-
with:
47-
name: coverage
27+
run: go tool ginkgo run -coverprofile=coverage.out -covermode=atomic ./...
4828
- name: Run octocov
4929
uses: k1LoW/octocov-action@v1
5030
with:
5131
github-token: ${{ secrets.GITHUB_TOKEN }}
52-
lint:
53-
name: Lint
54-
runs-on: ubuntu-latest
55-
steps:
56-
- name: Checkout code
57-
uses: actions/checkout@v4
58-
- name: Set up Go
59-
uses: actions/setup-go@v5
60-
with:
61-
go-version-file: go.mod
62-
cache: true
6332
- name: Run golangci-lint
6433
uses: golangci/golangci-lint-action@v6
6534
with:
6635
version: latest
67-
release-please:
68-
name: Release Please
69-
runs-on: ubuntu-latest
70-
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
71-
needs: [test, lint]
72-
steps:
7336
- name: Run release-please
7437
uses: googleapis/release-please-action@v4
7538
with:

‎.octocov.yml‎

Lines changed: 11 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,16 @@
11
coverage:
2-
paths:
3-
- coverage.out
42
badge:
53
path: .github/coverage.svg
4+
paths:
5+
- coverage.out
6+
acceptable: 0%
67
comment:
78
if: is_pull_request
8-
hideFooterLink: false
9-
diff:
10-
datastores:
11-
- artifact://.octocov
12-
codeToTestRatio:
13-
code:
14-
- "**/*.go"
15-
- "!**/*_test.go"
16-
test:
17-
- "**/*_test.go"
9+
deletePrevious: true
10+
summary:
11+
if: true
12+
report:
13+
if: is_default_branch
14+
push:
15+
if: is_default_branch
16+
message: Update by octocov [skip ci]

0 commit comments

Comments
 (0)