Skip to content

update readme (#20) #80

update readme (#20)

update readme (#20) #80

Workflow file for this run

# This is a basic workflow to help you get started with Actions
name: Build
on: [push, pull_request]
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
go: [ '1.22', '1.21', '1.20', '1.19', '1.18', '1.17', '1.16' ]
steps:
- uses: actions/checkout@v4
- name: "Setup Golang"
uses: actions/setup-go@v5
with:
go-version: ${{ matrix.go }}
# https://github.com/actions/cache/blob/master/examples.md#go---modules
- name: "Cache Go Modules"
id: cache
uses: actions/cache@v4
with:
path: ~/go/pkg/mod
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ runner.os }}-go-
- name: "Download Go Modules"
if: steps.cache.outputs.cache-hit != 'true'
run: go mod download
- name: "Test"
run: go test -v -race -coverpkg=./... -coverprofile=coverage.txt ./...
- name: "Upload coverage to Codecov"
uses: codecov/codecov-action@v4
with:
token: ${{ secrets.CODECOV_TOKEN }}
fail_ci_if_error: true