| 1 |
name: Build |
| 2 |
|
| 3 |
on: |
| 4 |
push: |
| 5 |
branches: [ master ] |
| 6 |
pull_request: |
| 7 |
branches: [ master ] |
| 8 |
|
| 9 |
jobs: |
| 10 |
|
| 11 |
build: |
| 12 |
name: Build |
| 13 |
runs-on: ubuntu-18.04 |
| 14 |
env: |
| 15 |
GOPATH: ${{ github.workspace }} |
| 16 |
GOCACHE: /tmp/gocache |
| 17 |
|
| 18 |
steps: |
| 19 |
- name: Set up Go 1.13 |
| 20 |
uses: actions/setup-go@v1 |
| 21 |
with: |
| 22 |
go-version: 1.13 |
| 23 |
|
| 24 |
- name: Check out code |
| 25 |
uses: actions/checkout@v2 |
| 26 |
with: |
| 27 |
path: ./src/github.com/${{ github.repository }} |
| 28 |
|
| 29 |
- name: Setup build environment |
| 30 |
run: | |
| 31 |
mkdir -p $GOCACHE |
| 32 |
cd ./src/github.com/${{ github.repository }} |
| 33 |
go version |
| 34 |
|
| 35 |
- name: Test and build package |
| 36 |
run: | |
| 37 |
cd ./src/github.com/${{ github.repository }} |
| 38 |
make test |
| 39 |
make build |