Skip to content

fixed issue #51

fixed issue #51 #124

Workflow file for this run

on:
push:
branches:
- "main"
tags:
- "v*.*.*"
pull_request:
jobs:
test:
name: Test
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
go:
- '^1.18'
- '^1.19'
- '^1.20'
steps:
- name: Check out code into the Go module directory
uses: actions/checkout@v3
- uses: actions/setup-go@v3
with:
go-version: ${{ matrix.go }}
cache: true
- name: Declare some variables
id: vars
run: |
echo "::set-output name=coverage_txt::${RUNNER_TEMP}/coverage.txt"
- name: Test Coverage (pkg)
run: go test ./... -race -coverprofile=${{ steps.vars.outputs.coverage_txt }}
- name: Upload coverage
if: ${{ matrix.go == '^1.20' }}
uses: codecov/codecov-action@v2
with:
files: ${{ steps.vars.outputs.coverage_txt }}