-
-
Notifications
You must be signed in to change notification settings - Fork 1
43 lines (37 loc) · 1.1 KB
/
main.yml
File metadata and controls
43 lines (37 loc) · 1.1 KB
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
name: main
on: [push, pull_request]
jobs:
test:
name: Build on ${{ matrix.os }} with Go ${{ matrix.go }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-18.04, windows-2019, macOS-10.14]
go: ['1.14']
steps:
- name: Set up Go ${{ matrix.go }}
uses: actions/setup-go@v1
with:
go-version: ${{ matrix.go }}
- name: Check out code into the Go module directory
uses: actions/checkout@v2
- name: Download dependencies
run: go mod download
- name: Cache modules
uses: actions/cache@v1
with:
path: ~/go/pkg/mod
key: ${{ runner.OS }}-go-${{ hashFiles('**/go.sum') }}
- name: Build
run: go build ./...
- name: Test
run: go test -v -coverpkg ./... -covermode atomic -coverprofile coverage.txt ./...
env:
ANNICT_TOKEN: dummy
ANNICT_ENDPOINT: http://example.com/dummy
SLACK_SIGNING_SECRET: dummy
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v1
with:
token: ${{ secrets.CODECOV_TOKEN }}
file: ./coverage.txt