-
Notifications
You must be signed in to change notification settings - Fork 6
49 lines (40 loc) · 1.26 KB
/
build.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
on: [push, pull_request]
name: Build
jobs:
build:
name: Build
runs-on: ubuntu-latest
strategy:
matrix:
go: [ '1.13.10']
steps:
- name: Get the version
id: get_version
run: echo ::set-output name=VERSION::${GITHUB_REF/refs\/tags\//}
- name: Set up Go 1.x
uses: actions/setup-go@v2
with:
go-version: ${{ matrix.go }}
id: go
- name: Cache Build Dependencies # Speeds up subsquent builds
uses: actions/cache@v1
with:
path: ~/go/pkg/mod
key: go-${{ hashFiles('**/go.sum') }}
- name: Check out code into the Go module directory
uses: actions/checkout@v2
- name: Download private dependencies
run: |
git config --global url."https://${GITHUB_TOKEN}:[email protected]/".insteadOf "https://github.com/"
GOPRIVATE=github.com/armory-io/dinghy go get github.com/armory-io/dinghy/pkg/parsers/yaml@master
go mod vendor
env:
GITHUB_TOKEN: ${{ secrets.ARMORYIO_GITHUB_TOKEN }}
- name: Build
run: go build -v .
- name: Test
run: go test -v -coverprofile=profile.cov ./...
- name: Send Coverage
uses: shogo82148/actions-goveralls@v1
with:
path-to-profile: profile.cov