-
Notifications
You must be signed in to change notification settings - Fork 3
44 lines (37 loc) · 1.07 KB
/
build.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
name: Build and Test
on:
push:
branches:
- master
- gh-actions
pull_request:
branches: [ master ]
jobs:
build_and_test:
name: Build and test reaper-client-go
runs-on: ubuntu-latest
env:
GOPATH: /home/runner/go
GOROOT: /usr/local/go1.15
steps:
- name: Install docker-compose
run: |
sudo curl -L "https://github.com/docker/compose/releases/download/1.27.4/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose
sudo chmod +x /usr/local/bin/docker-compose
- name: Set up Go 1.x
uses: actions/setup-go@v2
with:
go-version: ^1.15
id: go
- name: Check out code into the Go module directory
uses: actions/checkout@v2
- uses: actions/cache@v2
with:
path: ~/go/pkg/mod
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ runner.os }}-go-
- name: Run unit tests
run: |
export PATH=$GOROOT/bin:$GOPATH/bin:$PATH
make test