Skip to content

Migrate to assertion package (#477) #34

Migrate to assertion package (#477)

Migrate to assertion package (#477) #34

Workflow file for this run

name: Code Coverage
on:
pull_request:
types: [opened, reopened, synchronize]
push:
branches:
- 'main'
env:
GO_VER: '1.23.*'
jobs:
unit_tests:
name: "Unit tests"
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Setup Go
uses: actions/setup-go@v5
with:
go-version: ${{ env.GO_VER }}
cache: false
- name: Test
run: go test $(go list ./... | grep -v "github.com/synadia-io/nex/test" | grep -v gen | grep -v pb) -coverprofile=coverage.txt
- name: Archive code coverage results
uses: actions/upload-artifact@v4
with:
name: code-coverage
path: coverage.txt
code_coverage:
name: "Code coverage report"
if: github.event_name == 'pull_request'
runs-on: ubuntu-latest
needs: unit_tests
permissions:
contents: read
actions: read
pull-requests: write
steps:
- uses: fgrosse/go-coverage-report@v1.2.0
with:
coverage-artifact-name: "code-coverage"
coverage-file-name: "coverage.txt"