2020-05-17 20:07:40 +02:00
|
|
|
name: Build
|
2020-05-17 19:59:22 +02:00
|
|
|
|
|
|
|
on:
|
|
|
|
push:
|
2022-05-09 10:47:31 +02:00
|
|
|
branches: [ main ]
|
2020-05-17 19:59:22 +02:00
|
|
|
pull_request:
|
2022-05-09 10:47:31 +02:00
|
|
|
branches: [ main ]
|
2020-05-17 19:59:22 +02:00
|
|
|
|
|
|
|
jobs:
|
|
|
|
|
|
|
|
build:
|
|
|
|
name: Build
|
|
|
|
runs-on: ubuntu-18.04
|
|
|
|
env:
|
|
|
|
GOPATH: ${{ github.workspace }}
|
|
|
|
GOCACHE: /tmp/gocache
|
|
|
|
|
|
|
|
steps:
|
|
|
|
- name: Set up Go 1.13
|
|
|
|
uses: actions/setup-go@v1
|
|
|
|
with:
|
|
|
|
go-version: 1.13
|
|
|
|
|
|
|
|
- name: Check out code
|
|
|
|
uses: actions/checkout@v2
|
|
|
|
with:
|
|
|
|
path: ./src/github.com/${{ github.repository }}
|
|
|
|
|
|
|
|
- name: Setup build environment
|
|
|
|
run: |
|
|
|
|
mkdir -p $GOCACHE
|
|
|
|
cd ./src/github.com/${{ github.repository }}
|
|
|
|
go version
|
|
|
|
|
|
|
|
- name: Test and build package
|
|
|
|
run: |
|
|
|
|
cd ./src/github.com/${{ github.repository }}
|
|
|
|
make test
|
|
|
|
make build
|