-
Notifications
You must be signed in to change notification settings - Fork 51
40 lines (35 loc) · 1.51 KB
/
test-suite.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
name: Test Suite
on: [push, pull_request]
permissions: read-all
jobs:
test-suite:
strategy:
fail-fast: false
max-parallel: 1
matrix:
os: [ubuntu-20.04]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332
- name: Setup Golang
uses: actions/setup-go@0a12ed9d6a96ab950c8f026ed9f722fe0da7ef32
with:
go-version: '1.19'
- name: Set env vars (gocov)
run: |
go install github.com/axw/gocov/gocov@b6eca663ebb7e7ef9798914d19f53ba2c6f74c96
echo "$HOME/go/bin" >> $GITHUB_PATH
sudo mkdir -p /var/edge-orchestration/mnedc
echo -e 'server-ip: 192.168.0.125\nport: 3334' | sudo tee /var/edge-orchestration/mnedc/client-config.yaml
sudo mkdir -p /var/edge-orchestration/certs
if [ ! -e /var/edge-orchestration/certs/ca-crt.pem ]; then \
cd tools ; ./gen_ca_cert.sh ; sudo cp ./certs/ca-crt.pem /var/edge-orchestration/certs/ ; cd ../ ; \
fi
if [ ! -e /var/edge-orchestration/certs/hen-crt.pem ]; then \
cd tools ; ./gen_hen_cert.sh 1.1.1.1 ; sudo cp ./certs/1.1.1.1/hen-*.pem /var/edge-orchestration/certs/ ; cd ../ ; sudo chmod +r /var/edge-orchestration/certs/hen-key.pem ; \
fi
- name: Run the Test Suite
run: |
GO111MODULE=on go mod tidy
GO111MODULE=on go mod vendor
gocov test $(go list ./internal/... | grep -v cpu | grep -v mock) -coverprofile=/dev/null