Skip to content

changed coverage output to txt and add Codecov token #7

changed coverage output to txt and add Codecov token

changed coverage output to txt and add Codecov token #7

Workflow file for this run

name: CI
on:
push:
branches: [ "master" ]
pull_request:
branches: [ "master" ]
workflow_dispatch:
jobs:
test:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Retrieve Go version from go.mod
id: get-go-version
run: |
go_version=$(go mod edit -json | jq -r .Go)
echo "GO_VERSION=${go_version}" >> $GITHUB_ENV
echo "Go version is $go_version"
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: ${{ env.GO_VERSION }}
- name: Run Tests with Coverage
run: |
go get -d -v ./...
make test:coverage
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v4
with:
token: ${{ secrets.CODECOV_TOKEN }}