-
Notifications
You must be signed in to change notification settings - Fork 0
57 lines (55 loc) · 1.72 KB
/
ci-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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
name: ci-tests
on:
workflow_dispatch:
push:
branches:
- main
paths:
- api/**
- internal/**
pull_request:
branches:
- main
paths:
- api/**
- internal/**
jobs:
tests:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Generate Config
run: |
go get github.com/cloudflare/cfssl/cmd/...
export PATH=${PATH}:${HOME}/go/bin
make gencert
make genacl
- name: Test Log
working-directory: ./internal/log
run: |
go test -v -race -coverprofile=profile.out -covermode=atomic
cat profile.out >> ${HOME}/coverage.txt
- name: Test Server
working-directory: ./internal/server
run: |
go test -v -race -coverprofile=profile.out -covermode=atomic
cat profile.out >> ${HOME}/coverage.txt
- name: Test Service discovery
working-directory: ./internal/discovery
run: |
go test -v -race -coverprofile=profile.out -covermode=atomic
cat profile.out >> ${HOME}/coverage.txt
- name: Test client-side load balancing
working-directory: ./internal/loadbalance
run: |
go test -v -race -coverprofile=profile.out -covermode=atomic
cat profile.out >> ${HOME}/coverage.txt
- name: Test Agent (with raft consensus)
working-directory: ./internal/agent
run: |
go test -v -race -coverprofile=profile.out -covermode=atomic
cat profile.out >> ${HOME}/coverage.txt
- name: Obtain code coverage report
run: cp ${HOME}/coverage.txt coverage.out
- name: Upload code coverage report to Codecov
uses: codecov/codecov-action@v2