generated from kyma-project/template-repository
-
Notifications
You must be signed in to change notification settings - Fork 10
36 lines (33 loc) · 1.19 KB
/
test-unit-coverage.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: Verify Unit Test Coverage
on:
pull_request:
branches: ["main"]
env:
coverage_guard: ${{ github.workspace }}/scripts/coverage-metrics/bin/utils/unit-test-coverage/coverage_guard.py
pip_requirements: ${{ github.workspace }}/scripts/coverage-metrics/bin/utils/unit-test-coverage/requirements.txt
jobs:
verify-unit-test-coverage:
name: Verify Unit Test Coverage
runs-on: ubuntu-latest
steps:
- name: Check out reporting tools
uses: actions/checkout@v4
with:
repository: kyma-project/qa-toolkit
path: scripts
- name: Adjust the reporting tools
run: |
chmod a+x $coverage_guard
python -m pip install --upgrade pip
pip install -r $pip_requirements
- name: Check out the sourcecode
uses: actions/checkout@v4
with:
path: codebase
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version-file: ${{ github.workspace }}/codebase/go.mod
- name: Run the quality gate verification
run: |
$coverage_guard --repo ${{ github.workspace }}/codebase --module github.com/kyma-project/modulectl --config unit-test-coverage.yaml