Skip to content

Update coverage.yml cache (#12) #9

Update coverage.yml cache (#12)

Update coverage.yml cache (#12) #9

Workflow file for this run

name: Coverage
on:
push:
branches:
- main
jobs:
coverage:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4.2.2
- uses: actions/setup-go@v5.5.0
with:
go-version: '1.24'
- uses: actions/cache@v4.2.3
with:
path: |
~/.cache/go-build
${{ env.GOPATH }}/pkg/mod
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ runner.os }}-go-
- name: Download dependencies
run: go mod download
- name: Run tests with coverage
run: go test ./... -coverprofile=coverage.txt
- name: Upload results to Codecov
uses: codecov/codecov-action@v5
with:
token: ${{ secrets.CODECOV_TOKEN }}