2020-10-05 04:29:47 -05:00
|
|
|
name: Continuous Integration
|
|
|
|
|
|
|
|
on:
|
|
|
|
push:
|
|
|
|
branches:
|
|
|
|
- '**'
|
|
|
|
# - $default-branch
|
|
|
|
pull_request:
|
|
|
|
branches:
|
|
|
|
- '**'
|
|
|
|
# - $default-branch
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
build:
|
|
|
|
env:
|
|
|
|
COVER: true
|
2021-02-17 20:15:45 +00:00
|
|
|
runs-on: ubuntu-20.04
|
2020-10-05 04:29:47 -05:00
|
|
|
steps:
|
|
|
|
|
2020-10-08 02:46:41 +09:00
|
|
|
- name: Check out code
|
2020-10-05 04:29:47 -05:00
|
|
|
uses: actions/checkout@v2
|
|
|
|
|
2021-02-17 20:59:46 +00:00
|
|
|
- name: Set up Go 1.16
|
2020-10-05 04:29:47 -05:00
|
|
|
uses: actions/setup-go@v2
|
|
|
|
with:
|
2021-02-17 20:59:46 +00:00
|
|
|
go-version: 1.16.x
|
2020-10-05 04:29:47 -05:00
|
|
|
id: go
|
|
|
|
|
|
|
|
- name: Get dependencies
|
|
|
|
run: |
|
2021-02-17 20:15:45 +00:00
|
|
|
curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(go env GOPATH)/bin v1.36.0
|
2020-10-05 04:29:47 -05:00
|
|
|
curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64 > ./cc-test-reporter
|
|
|
|
chmod +x ./cc-test-reporter
|
|
|
|
|
2020-11-07 16:31:31 +00:00
|
|
|
- name: Verify Code Generation
|
|
|
|
run: |
|
|
|
|
make verify-generate
|
|
|
|
|
2020-10-05 04:29:47 -05:00
|
|
|
- name: Lint
|
|
|
|
run: |
|
|
|
|
make lint
|
|
|
|
|
|
|
|
- name: Build
|
|
|
|
run: |
|
|
|
|
make build
|
|
|
|
|
|
|
|
- name: Test
|
|
|
|
env:
|
|
|
|
CC_TEST_REPORTER_ID: ${{ secrets.CC_TEST_REPORTER_ID }}
|
|
|
|
run: |
|
2020-10-07 18:14:41 +01:00
|
|
|
./.github/workflows/test.sh
|
2020-10-08 02:46:41 +09:00
|
|
|
|
|
|
|
docker:
|
2021-02-17 20:15:45 +00:00
|
|
|
runs-on: ubuntu-20.04
|
2020-10-08 02:46:41 +09:00
|
|
|
steps:
|
|
|
|
|
|
|
|
- name: Check out code
|
|
|
|
uses: actions/checkout@v2
|
|
|
|
|
2021-09-21 08:17:59 -05:00
|
|
|
- name: Set up Docker Buildx
|
|
|
|
id: buildx
|
|
|
|
uses: crazy-max/ghaction-docker-buildx@v3
|
|
|
|
with:
|
|
|
|
buildx-version: latest
|
|
|
|
qemu-version: latest
|
|
|
|
|
2020-10-08 02:46:41 +09:00
|
|
|
- name: Docker Build
|
|
|
|
run: |
|
|
|
|
make docker
|