unbound_exporter/.github/workflows/test.yaml

43 lines
918 B
YAML
Raw Normal View History

2021-11-17 19:15:26 +00:00
name: test
on:
push:
branches:
- main
- master
pull_request:
workflow_dispatch:
env:
GO111MODULE: "auto"
jobs:
test:
strategy:
matrix:
go-version:
- 1.20.x
- 1.21.x
2021-11-17 19:15:26 +00:00
os: [ubuntu-latest]
runs-on: ${{ matrix.os }}
steps:
- name: Install Go
uses: actions/setup-go@v4
2021-11-17 19:15:26 +00:00
with:
go-version: ${{ matrix.go-version }}
- name: Checkout code
uses: actions/checkout@v4
2021-11-17 19:15:26 +00:00
- name: golangci-lint
uses: golangci/golangci-lint-action@v2
with:
version: latest
- name: go coverage
run: |
go test -mod=readonly -v -race -covermode=atomic -coverprofile=coverage.out ./...
- uses: codecov/codecov-action@v3
2021-11-17 19:15:26 +00:00
if: success()
with:
file: ./coverage.out
flags: unbound_exporter_tests
name: unbound_exporter tests