-
Notifications
You must be signed in to change notification settings - Fork 64
47 lines (47 loc) · 1.03 KB
/
test.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
name: Test
on:
push:
branches:
- master
- main
- release/**
- test/**
- build/**
pull_request:
permissions:
contents: read
defaults:
run:
shell: bash
jobs:
test:
name: All
runs-on: ${{ matrix.os }}-latest
env:
GOFLAGS: "-mod=readonly"
steps:
- uses: actions/setup-go@v3
with:
go-version: ${{ matrix.go }}
- uses: actions/checkout@v3
- name: Build
run: make build
- name: Vet
run: make vet
- name: Check go.mod Tidiness
run: make mod-tidy
- name: Test
run: make test-coverage
- name: Upload coverage reports to Codecov
# https://github.com/codecov/codecov-action/releases/tag/v3.1.4
uses: codecov/codecov-action@eaaf4bedf32dbdc6b720b63067d99c4d77d6047d
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
with:
directory: .coverage
timeout-minutes: 10
strategy:
matrix:
go: ["1.20"]
os: [ubuntu]
fail-fast: false