Skip to content

Commit

Permalink
feat: Automate code coverage reports (#26)
Browse files Browse the repository at this point in the history
  • Loading branch information
juanjjaramillo authored May 16, 2024
1 parent e3143bc commit 67cbd28
Showing 1 changed file with 29 additions and 0 deletions.
29 changes: 29 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,35 @@ permissions:
contents: read

jobs:
tests:
name: Unit tests
runs-on: ubuntu-latest
steps:
- name: Checkout GitHub Repository
uses: actions/checkout@44c2b7a8a4ea60a981eaca3cf939b5f4305c123b # v4.1.5

- name: Set up Go
uses: actions/setup-go@cdcb36043654635271a94b9a6d1392de5bb323a7 # v5.0.1
with:
go-version-file: './go.mod'

- name: Set up tests
run: |
make clean
make format
make modules
- name: Run unit tests for Go
run: |
make test
- name: Upload coverage reports to Codecov
uses: codecov/codecov-action@5ecb98a3c6b747ed38dc09f787459979aebb39be # v4.3.1
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
with:
files: ./tmp/cover.out

build:
name: Build Docker image
runs-on: ubuntu-latest
Expand Down

0 comments on commit 67cbd28

Please sign in to comment.