Skip to content

chore(deps): bump codecov/codecov-action from 3 to 4 #41

chore(deps): bump codecov/codecov-action from 3 to 4

chore(deps): bump codecov/codecov-action from 3 to 4 #41

Workflow file for this run

name: Tests
on:
push:
paths-ignore:
- '**.md'
pull_request:
paths-ignore:
- '**.md'
env:
GO111MODULE: on
GOPROXY: "https://proxy.golang.org"
jobs:
build:
name: Test on ${{ matrix.os }} @Go${{ matrix.go-version }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
go-version: ["1.18.x", "1.19.x"]
os: [ubuntu-latest, macos-latest, windows-latest]
steps:
- name: Set up Go ${{ matrix.go-version }}
uses: actions/setup-go@v4
with:
go-version: ${{ matrix.go-version }}
- name: Check out code into the Go module directory
uses: actions/[email protected]
- name: Print Go environment
id: vars
run: |
printf "Using go at: $(which go)\n"
printf "Go version: $(go version)\n"
printf "\n\nGo environment:\n\n"
go env
printf "\n\nSystem environment:\n\n"
env
# Calculate the short SHA1 hash of the git commit
echo "::set-output name=short_sha::$(git rev-parse --short HEAD)"
echo "::set-output name=go_cache::$(go env GOCACHE)"
- name: Cache go modules
uses: actions/cache@v3
with:
path: |
${{ steps.vars.outputs.go_cache }}
~/go/pkg/mod
key: ${{ runner.os }}-${{ matrix.go-version }}-go-ci-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ runner.os }}-${{ matrix.go-version }}-go-ci
- name: Unit test
run: |
go test -v -race -coverprofile=coverage -covermode=atomic ./...
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v4
with:
files: ./coverage
flags: unittests
verbose: true