Skip to content

Commit

Permalink
code coverage (#12)
Browse files Browse the repository at this point in the history
  • Loading branch information
yuanbohan authored Feb 1, 2024
1 parent 1857714 commit b66d47c
Showing 1 changed file with 10 additions and 6 deletions.
16 changes: 10 additions & 6 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
name: ci

on:
on:
pull_request:
types: [opened, synchronize, reopened, ready_for_review]

push:
branches:
- "main"
Expand All @@ -15,15 +15,17 @@ jobs:
ci:
if: github.event.pull_request.draft == false
runs-on: ubuntu-latest
strategy:
matrix:
go-version: ["1.19.x", "1.20.x", "1.21.x"]
steps:
- name: Checkout Repository
uses: actions/checkout@v3

- name: Set up Go
- name: Set up Go ${{ matrix.go-version }}
uses: actions/setup-go@v3
with:
go-version: '1.19.x'
# go-version-file: './go.mod'
go-version: ${{ matrix.go-version }}
cache: true

- name: Build
Expand All @@ -32,5 +34,7 @@ jobs:
- name: Test
run: go test -v ./... -race -covermode=atomic -coverprofile=coverage.out

- name: Upload coverage to Codecov
- name: Upload coverage reports to Codecov
uses: codecov/codecov-action@v3
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}

0 comments on commit b66d47c

Please sign in to comment.