-
Notifications
You must be signed in to change notification settings - Fork 0
41 lines (36 loc) · 899 Bytes
/
tests.yml
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
name: Go
on:
pull_request:
branches:
- 'master'
push:
tags:
- '*'
jobs:
build:
name: Build on golang ${{ matrix.go_version }} and ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
go_version:
- "1.19"
- "1.20"
- "1.21"
os:
- "ubuntu-latest"
- "macOS-latest"
steps:
- name: Set up Go ${{ matrix.go_version }}
uses: actions/setup-go@v4
with:
go-version: ${{ matrix.go_version }}
id: go
- name: Check out code into the Go module directory
uses: actions/checkout@v4
- name: Get dependencies
run: |
go mod download
- name: Test
run: go test -v -race -coverprofile=coverage.txt -covermode=atomic ./...
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v3