2020-03-21 20:53:50 +01:00
|
|
|
name: Integration
|
|
|
|
|
2021-02-18 09:07:47 +01:00
|
|
|
on:
|
|
|
|
push:
|
2022-02-25 09:43:31 +01:00
|
|
|
branches:
|
|
|
|
- main
|
|
|
|
pull_request_target:
|
2020-03-21 20:53:50 +01:00
|
|
|
|
|
|
|
jobs:
|
|
|
|
test:
|
|
|
|
name: Test
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
2022-03-01 20:28:48 +01:00
|
|
|
- uses: actions/checkout@v3
|
2021-09-14 11:37:38 +02:00
|
|
|
|
2020-03-21 20:53:50 +01:00
|
|
|
- name: Setup go
|
2022-02-28 14:05:17 +01:00
|
|
|
uses: actions/setup-go@v3
|
2020-03-21 20:53:50 +01:00
|
|
|
with:
|
2022-02-20 12:32:34 +01:00
|
|
|
go-version: '1.17.x'
|
2021-09-14 11:37:38 +02:00
|
|
|
|
2022-02-26 10:56:51 +01:00
|
|
|
- name: Cache Go Dependencies
|
|
|
|
uses: actions/cache@v2
|
|
|
|
with:
|
|
|
|
path: |
|
|
|
|
~/.cache/go-build
|
|
|
|
~/go/pkg/mod
|
|
|
|
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
|
|
|
|
restore-keys: |
|
|
|
|
${{ runner.os }}-go-
|
|
|
|
|
2020-03-21 20:53:50 +01:00
|
|
|
- name: Vet
|
2021-09-14 11:37:38 +02:00
|
|
|
run: go vet
|
|
|
|
|
2020-03-21 20:53:50 +01:00
|
|
|
- name: Test
|
2021-09-14 11:37:38 +02:00
|
|
|
run: go test ./...
|
2020-03-21 20:53:50 +01:00
|
|
|
|
|
|
|
build:
|
|
|
|
name: Build
|
|
|
|
runs-on: ubuntu-latest
|
2021-09-14 11:37:38 +02:00
|
|
|
needs:
|
|
|
|
- test
|
2020-03-21 20:53:50 +01:00
|
|
|
steps:
|
2022-03-01 20:28:48 +01:00
|
|
|
- uses: actions/checkout@v3
|
2021-09-14 11:37:38 +02:00
|
|
|
|
2020-03-21 20:53:50 +01:00
|
|
|
- name: Setup go
|
2022-02-28 14:05:17 +01:00
|
|
|
uses: actions/setup-go@v3
|
2020-03-21 20:53:50 +01:00
|
|
|
with:
|
2022-02-20 12:32:34 +01:00
|
|
|
go-version: '1.17.x'
|
2021-09-14 11:37:38 +02:00
|
|
|
|
2022-02-26 10:56:51 +01:00
|
|
|
- name: Cache Go Dependencies
|
|
|
|
uses: actions/cache@v2
|
|
|
|
with:
|
|
|
|
path: |
|
|
|
|
~/.cache/go-build
|
|
|
|
~/go/pkg/mod
|
|
|
|
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
|
|
|
|
restore-keys: |
|
|
|
|
${{ runner.os }}-go-
|
|
|
|
|
2020-03-21 20:53:50 +01:00
|
|
|
- name: Build
|
2021-09-14 11:37:38 +02:00
|
|
|
run: go build ./...
|
2020-03-21 20:53:50 +01:00
|
|
|
|
|
|
|
- name: Docker
|
2021-09-14 11:37:38 +02:00
|
|
|
run: docker build .
|