Skip to content

Commit 90188aa

Browse files
committed
ci: add main branch ci
1 parent a1c8976 commit 90188aa

File tree

2 files changed

+28
-2
lines changed

2 files changed

+28
-2
lines changed

.github/workflows/ci.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ jobs:
2020
- golang-build-check
2121
- golang-fmt-check
2222
- golang-lint-check
23-
- golang-test-coverage-check
23+
- golang-coverage-check
2424
- golang-test-check
2525
- golang-generate-check
2626
steps:
@@ -103,7 +103,7 @@ jobs:
103103
cache-dependency-path: go.sum
104104
- uses: golangci/golangci-lint-action@971e284b6050e8a5849b72094c50ab08da042db8 # v6.1.1
105105

106-
golang-test-coverage-check:
106+
golang-coverage-check:
107107
runs-on: ubuntu-latest
108108
timeout-minutes: 10
109109
steps:

.github/workflows/main.yml

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
name: Main branch CI
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
8+
jobs:
9+
golang-coverage-check:
10+
runs-on: ubuntu-latest
11+
timeout-minutes: 10
12+
steps:
13+
- uses: actions/checkout@v4
14+
- name: Set up Go
15+
uses: actions/setup-go@v5
16+
with:
17+
go-version-file: go.mod
18+
cache-dependency-path: go.sum
19+
- name: Run go test
20+
id: golang-test
21+
run: |
22+
go test -race -coverprofile=coverage.txt -covermode=atomic -p=5 ./...
23+
- name: Upload coverage to Codecov
24+
uses: codecov/codecov-action@7f8b4b4bde536c465e797be725718b88c5d95e0e # v5.1.1
25+
with:
26+
token: ${{ secrets.CODECOV_TOKEN }}

0 commit comments

Comments
 (0)