This repository was archived by the owner on Aug 14, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
57 lines (47 loc) · 1.24 KB
/
tests.yml
File metadata and controls
57 lines (47 loc) · 1.24 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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
name: tests
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
jobs:
test:
name: Test
strategy:
matrix:
os:
- ubuntu-latest
go-version:
- 1.13.x
- 1.14.x
- 1.15.x
runs-on: ${{ matrix.os }}
steps:
- name: Set up Go ${{ matrix.go-version }}
uses: actions/setup-go@v2
with:
go-version: ${{ matrix.go-version }}
id: go
- name: Set environment variables
run: |
echo "::set-env name=GOPATH::$GITHUB_WORKSPACE/go"
echo "::add-path::$GITHUB_WORKSPACE/go/bin"
echo "::set-env name=WORKDIR::$GITHUB_WORKSPACE/go/src/github.com/gebv/genembed"
- name: Check out code into the Go module directory
uses: actions/checkout@v2
with:
path: ${{ env.WORKDIR }}
# TODO: add linter
- name: Test
working-directory: ${{ env.WORKDIR }}
run: make test
- name: Check code changes
working-directory: ${{ env.WORKDIR }}
run: |
go mod tidy
git status
git diff --exit-code
- name: Upload coverage metrics
working-directory: ${{ env.WORKDIR }}
run: |
bash <(curl -s https://codecov.io/bash) -X fix -f coverage.txt