-
Notifications
You must be signed in to change notification settings - Fork 0
59 lines (47 loc) · 1.36 KB
/
test.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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
name: Test
on: [push, pull_request]
jobs:
lint:
runs-on: ubuntu-latest
continue-on-error: false
timeout-minutes: 5
steps:
- name: Install Go
uses: actions/setup-go@v2
with:
go-version: '^1.15'
- name: Checkout Code
uses: actions/checkout@v2
- name: Lint
uses: golangci/golangci-lint-action@v2
with:
version: v1.40.1
test:
runs-on: ubuntu-latest
continue-on-error: false
timeout-minutes: 15
needs: lint
steps:
- name: Install Go
uses: actions/setup-go@v2
with:
go-version: '^1.15'
- name: Checkout Code
uses: actions/checkout@v2
- name: Test
run: go test -count=1 -timeout 60s ./...
- name: Test Reporter 1
run: |
export GIT_COMMIT_SHA="${GITHUB_SHA}"
export GIT_BRANCH="${GITHUB_REF/refs\/heads\//}"
curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64 > ./cc-test-reporter
chmod +x ./cc-test-reporter
./cc-test-reporter before-build
- name: Test With Coverage
run: |
go test -count=1 -timeout 60s -p 1 -coverprofile c.out -coverpkg=./... ./...
- name: Test Reporter 2
env:
CC_TEST_REPORTER_ID: ${{ secrets.CC_TEST_REPORTER_ID }}
run: |
./cc-test-reporter after-build --prefix github.com/dc0d/wrapperr