-
Notifications
You must be signed in to change notification settings - Fork 0
36 lines (31 loc) · 930 Bytes
/
unit-tests.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
name: Unit Tests
on: [push, pull_request]
jobs:
test:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest]
make_target: [test, vet]
steps:
- name: Set up Go
uses: actions/setup-go@v2
with:
go-version: ^1.15
id: go
- name: Check out code repository source code
uses: actions/[email protected]
- uses: actions/[email protected]
with:
path: ~/go/pkg/mod
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ runner.os }}-go-
# https://help.github.com/en/actions/reference/workflow-commands-for-github-actions
- name: Set build variables
run: |
echo "::set-env name=MAKE_TARGET::${{ matrix.make_target }}"
- name: Run ${{matrix.make_target}}
run: |
make $MAKE_TARGET