30 lines
690 B
YAML
30 lines
690 B
YAML
name: test
|
|
on:
|
|
pull_request:
|
|
paths-ignore:
|
|
- '*.md'
|
|
push:
|
|
branches:
|
|
- master
|
|
paths-ignore:
|
|
- '*.md'
|
|
jobs:
|
|
test:
|
|
name: test
|
|
runs-on: ubuntu-latest
|
|
timeout-minutes: 3
|
|
steps:
|
|
- uses: actions/setup-go@v3
|
|
with:
|
|
go-version: 1.19
|
|
- uses: actions/checkout@v3
|
|
- name: Benchmark
|
|
run: go test -bench . -race
|
|
- name: Test (race)
|
|
run: go test -mod vendor ./... -race
|
|
- name: Test (coverage)
|
|
run: go test -mod vendor ./... -coverprofile=coverage.txt -covermode=atomic
|
|
- name: Codecov
|
|
uses: codecov/codecov-action@v3.1.1
|
|
with:
|
|
files: ./coverage.txt
|