-
Notifications
You must be signed in to change notification settings - Fork 355
76 lines (65 loc) · 1.74 KB
/
push.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
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
on:
push:
name: push
jobs:
golangci:
name: lint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 1
- name: golangci-lint
uses: golangci/golangci-lint-action@v2
with:
# Required: the version of golangci-lint is required and must be specified without patch version: we always use the latest patch version.
version: v1.29
args: --timeout=5m
working-directory: ./tests
test:
name: Test with Coverage
runs-on: ubuntu-latest
steps:
- name: Set up Go
uses: actions/setup-go@v1
with:
go-version: '1.16.3'
- name: Get Build Tools
run: |
GO111MODULE=on go get github.com/ory/go-acc
- name: Add $GOPATH/bin to $PATH
run: |
echo "$(go env GOPATH)/bin" >> "$GITHUB_PATH"
- name: git checkout
uses: actions/checkout@v2
with:
fetch-depth: 1
- name: Install dependencies
working-directory: ./tests
run: |
go mod download
- name: Run Unit tests
working-directory: ./tests
run: |
go-acc .
build:
name: Lint and build
runs-on: ubuntu-latest
steps:
- name: install go
uses: actions/setup-go@v2
with:
go-version: '1.16.3'
- name: git checkout
uses: actions/checkout@v2
with:
fetch-depth: 1
- name: install lint
working-directory: ./tests
run: GO111MODULE=off go get golang.org/x/lint/golint
- name: run golint and go fmt
working-directory: ./tests
run: ./lint.sh
- name: go build
working-directory: ./tests
run: go build