@@ -0,0 +1,55 @@
1+name: Continuous Integration
2+
3+on:
4+ push:
5+ branches:
6+ - '**'
7+ # - $default-branch
8+ pull_request:
9+ branches:
10+ - '**'
11+ # - $default-branch
12+
13+jobs:
14+ build:
15+ env:
16+ COVER: true
17+ GOPATH: ${{ github.workspace }}
18+ runs-on: ubuntu-18.04
19+ steps:
20+
21+ - name: Check out code into the Go module directory
22+ uses: actions/checkout@v2
23+ with:
24+ path: ./src/github.com/${{ github.repository }}
25+
26+ - name: Set up Go 1.14
27+ uses: actions/setup-go@v2
28+ with:
29+ go-version: ^1.14
30+ id: go
31+
32+ - name: Get dependencies
33+ run: |
34+ cd src/github.com/${{ github.repository }}
35+ curl -sfL https://install.goreleaser.com/github.com/golangci/golangci-lint.sh | sh -s -- -b $GOPATH/bin v1.24.0
36+ GO111MODULE=on go mod download
37+ curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64 > ./cc-test-reporter
38+ chmod +x ./cc-test-reporter
39+
40+ - name: Lint
41+ run: |
42+ cd src/github.com/${{ github.repository }}
43+ make lint
44+
45+ - name: Build
46+ run: |
47+ cd src/github.com/${{ github.repository }}
48+ make build
49+
50+ - name: Test
51+ env:
52+ CC_TEST_REPORTER_ID: ${{ secrets.CC_TEST_REPORTER_ID }}
53+ run: |
54+ cd src/github.com/${{ github.repository }}
55+ ./test.sh