Skip to content

ci: fix codecov

ci: fix codecov #3

Workflow file for this run

name: Run Tests
on:
push:
branches:
- master
pull_request: ~
env:
GO111MODULE: on
jobs:
tests:
name: unit tests
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-go@v4
with:
go-version: "1.20"
- name: Cache Go Modules
uses: actions/cache@v3
with:
path: ~/go/pkg/mod
key: ${{ runner.os }}-go-${{ hashFiles('go.sum') }}
restore-keys: ${{ runner.os }}-go-
- name: Run Tests
run: go test -v -race -coverprofile coverage.out -covermode atomic ./...
- name: Ensure Integration Tests Build
# don't actually run tests since they hit the live API
run: go test -v -tags=integration -run=^$ ./test/integration
- name: Upload Coverage to Codecov
if: success()
uses: codecov/codecov-action@v3
with:
file: ./coverage.out
lint:
name: lint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-go@v4
with:
go-version: '1.20'
- name: golangci-lint
uses: golangci/golangci-lint-action@v3
with:
version: v1.53.3