Skip to content

Implemented test coverage without codecov #6

Implemented test coverage without codecov

Implemented test coverage without codecov #6

Workflow file for this run

name: Tests
on:
pull_request:
branches:
- main
- master
push:
branches:
- main
- master
permissions:
contents: write
jobs:
test:
name: Tests & Coverage
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version-file: 'go.mod'
cache: true
- name: Download dependencies
run: make deps
- name: Run tests with coverage
run: make test-coverage
- name: Generate coverage badge
run: make coverage-badge
- name: Commit coverage badge
if: github.event_name == 'push'
run: |
git config --local user.email "github-actions[bot]@users.noreply.github.com"
git config --local user.name "github-actions[bot]"
git add .github/badges/coverage.svg
git diff --staged --quiet || git commit -m "Update coverage badge [skip ci]"
git push