-
Notifications
You must be signed in to change notification settings - Fork 6
executable file
·45 lines (39 loc) · 1.15 KB
/
onmergerelease.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
name: OnMergeRelease
on:
push:
branches:
- 'main'
- 'release/*'
tags:
- '**'
permissions: read-all
jobs:
build-test:
runs-on: [ ubuntu-20.04 ]
env:
http_proxy: ${{ secrets.HTTP_PROXY }}
https_proxy: ${{ secrets.HTTPS_PROXY }}
no_proxy: ${{ secrets.NO_PROXY }}
steps:
- name: Harden Runner
uses: step-security/harden-runner@91182cccc01eb5e619899d80e4e971d6181294a7 # v2.10.1
with:
egress-policy: audit
- uses: actions/checkout@ee0669bd1cc54295c223e0bb666b733df41de1c5 # v2.7.0
with:
fetch-depth: 0
- name: Build libraries and examples
run: make all
- name: Unit Test Coverage
run: |
test_output=$(make test-coverage)
if [ $? -ne 0 ]; then
echo "Unit tests failed"
exit 1
fi
COVERAGE=$(make test-coverage | grep 'Total:|' | awk -F\| '{print $2}' | awk -F. '{print $1}')
echo "Unit test coverage for Client is - $COVERAGE%"
if [[ $COVERAGE -lt 79 ]]; then
echo "Unit test coverage must be above 79%"
exit 1
fi