2020-04-30 17:37:41 +02:00
|
|
|
name: Continuous integration
|
|
|
|
|
2020-05-14 13:35:55 +02:00
|
|
|
on: [push]
|
|
|
|
|
2020-04-30 17:37:41 +02:00
|
|
|
jobs:
|
2020-05-14 13:35:55 +02:00
|
|
|
lint:
|
|
|
|
name: Lint
|
|
|
|
runs-on: ubuntu-latest
|
2020-05-14 22:13:35 +02:00
|
|
|
env:
|
|
|
|
GO111MODULE: "on"
|
2020-05-14 13:35:55 +02:00
|
|
|
steps:
|
2020-05-14 22:13:35 +02:00
|
|
|
- name: Set up Go 1.14
|
|
|
|
uses: actions/setup-go@v1
|
|
|
|
with:
|
|
|
|
go-version: 1.14
|
|
|
|
id: go
|
|
|
|
|
2020-05-14 13:35:55 +02:00
|
|
|
- name: Checkout code into the Go module directory
|
|
|
|
uses: actions/checkout@v2
|
|
|
|
|
|
|
|
- name: Run golangci-lint
|
2020-05-14 22:13:35 +02:00
|
|
|
run: |
|
|
|
|
curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b . v1.27.0
|
2020-06-09 07:22:40 +02:00
|
|
|
./golangci-lint run --timeout 10m0s
|
2020-05-14 22:13:35 +02:00
|
|
|
|
2020-04-30 17:37:41 +02:00
|
|
|
build:
|
|
|
|
name: Build
|
|
|
|
runs-on: ubuntu-latest
|
2020-05-14 13:35:55 +02:00
|
|
|
env:
|
|
|
|
GO111MODULE: "on"
|
2020-04-30 17:37:41 +02:00
|
|
|
steps:
|
2020-05-04 23:50:00 +02:00
|
|
|
- name: Set up Go 1.14
|
2020-04-30 17:41:59 +02:00
|
|
|
uses: actions/setup-go@v1
|
|
|
|
with:
|
2020-05-04 23:50:00 +02:00
|
|
|
go-version: 1.14
|
2020-04-30 17:41:59 +02:00
|
|
|
id: go
|
|
|
|
|
|
|
|
- name: Checkout code into the Go module directory
|
|
|
|
uses: actions/checkout@v2
|
|
|
|
|
2020-06-18 09:44:34 +02:00
|
|
|
- uses: actions/cache@v2
|
2020-05-14 13:35:55 +02:00
|
|
|
with:
|
|
|
|
path: ~/go/pkg/mod
|
2020-06-18 09:44:34 +02:00
|
|
|
key: go-${{ hashFiles('**/go.sum') }}
|
2020-04-30 17:37:41 +02:00
|
|
|
|
2020-04-30 17:41:59 +02:00
|
|
|
- name: Test
|
2020-06-15 17:41:59 +02:00
|
|
|
env:
|
|
|
|
BUILD_TAGS: example,local
|
2020-05-14 13:35:55 +02:00
|
|
|
run: make -f builder.Makefile test
|
|
|
|
|
|
|
|
- name: Build
|
2020-06-15 17:41:59 +02:00
|
|
|
env:
|
|
|
|
BUILD_TAGS: example,local
|
2020-05-14 13:35:55 +02:00
|
|
|
run: make -f builder.Makefile cli
|
2020-05-04 15:10:28 +02:00
|
|
|
|
|
|
|
- name: E2E Test
|
2020-06-30 10:14:19 +02:00
|
|
|
run: make e2e-local
|