-
Notifications
You must be signed in to change notification settings - Fork 1
36 lines (36 loc) · 1.18 KB
/
test.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
on: [push, pull_request]
name: Build and Test
jobs:
test:
strategy:
matrix:
go-version: [1.15.x]
os: [ubuntu-latest, macos-latest]
runs-on: ${{ matrix.os }}
steps:
- name: Install Go
uses: actions/setup-go@v2
with:
go-version: ${{ matrix.go-version }}
- name: Install libsodium, swig, and NTL # see https://stackoverflow.com/a/57948488/2945326
# Note that we copy-paste this script in both lint.yml and test.yml
# because "act" does not support composite actions
# https://github.com/nektos/act/issues/339
run: |
if [ "$RUNNER_OS" == "Linux" ]; then
sudo apt-get install -y libsodium-dev swig libntl-dev
elif [ "$RUNNER_OS" == "macOS" ]; then
brew install libsodium swig ntl
else
echo "$RUNNER_OS not supported"
exit 1
fi
shell: bash
- name: Install genny and codecgen
run: |
go get github.com/cheekybits/genny
go get github.com/ugorji/go/codec/codecgen
- name: Checkout code
uses: actions/checkout@v2
- name: Test
run: make test