Create go-tests.yml
This commit is contained in:
parent
8c956111ba
commit
d375450c3a
1 changed files with 22 additions and 0 deletions
22
.github/workflows/go-tests.yml
vendored
Normal file
22
.github/workflows/go-tests.yml
vendored
Normal file
|
|
@ -0,0 +1,22 @@
|
||||||
|
name: tests
|
||||||
|
|
||||||
|
on: [push, pull_request]
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
build:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v2
|
||||||
|
with:
|
||||||
|
fetch-depth: 2
|
||||||
|
- uses: actions/setup-go@v2
|
||||||
|
with:
|
||||||
|
go-version: '1.18'
|
||||||
|
- name: Run coverage
|
||||||
|
run: go test -coverprofile=coverage.out -covermode=atomic -v ./...
|
||||||
|
- name: Upload coverage to Codecov
|
||||||
|
uses: codecov/codecov-action@v2
|
||||||
|
with:
|
||||||
|
token: ${{ secrets.CODECOV_TOKEN }}
|
||||||
|
files: coverage.out
|
||||||
|
flags: unit-linux
|
||||||
Loading…
Reference in a new issue