Skip to content

Commit

Permalink
add test coverage reports
Browse files Browse the repository at this point in the history
Signed-off-by: Pranay Valson <[email protected]>
  • Loading branch information
noslav committed Sep 27, 2023
1 parent ea75983 commit ab9393b
Showing 1 changed file with 35 additions and 0 deletions.
35 changes: 35 additions & 0 deletions .github/workflows/test-coverage.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: go-test

on:
push:
branches:
- "main"
pull_request:
branches:
- "main"
- "develop"

jobs:
build:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
- name: Setup Go 1.19.x
uses: actions/setup-go@v4
with:
# Semantic version range syntax or exact version of Go
go-version: '1.19.x'
cache-dependency-path: ./go.sum
- name: Install dependencies
run: |
go get .
- name: Build Binaries
run: go build -v ./...
- name: Test with the Go CLI
run: go test ./... -coverprofile=coverage.out
- name: Upload coverage reports to Codecov
uses: codecov/codecov-action@v3
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}

0 comments on commit ab9393b

Please sign in to comment.