-
Notifications
You must be signed in to change notification settings - Fork 30
49 lines (46 loc) · 1.7 KB
/
report-package-metrics.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
name: Report Package Dependencies Metrics
run-name: Generate package dependencies report
on:
pull_request_target:
types:
- opened
- reopened
- edited
- synchronize
env:
spm: ${{ github.workspace }}/scripts/coverage-metrics/bin/utils/package-metrics/spm.py
compare: ${{ github.workspace }}/scripts/coverage-metrics/bin/utils/package-metrics/compare.py
pip_requirements: ${{ github.workspace }}/scripts/coverage-metrics/bin/utils/package-metrics/requirements.txt
base_metrics: /tmp/base.json
target_metrics: /tmp/target.json
jobs:
generate-report:
runs-on: ubuntu-latest
steps:
- name: Check out the target branch
uses: actions/checkout@v4
with:
ref: ${{ github.event.pull_request.head.ref }}
repository: ${{ github.event.pull_request.head.repo.full_name }}
path: target
- name: Check out the base branch
uses: actions/checkout@v4
with:
ref: ${{ github.base_ref }}
path: base
- name: Check out report scripts
uses: actions/checkout@v4
with:
repository: kyma-project/qa-toolkit
path: scripts
- name: Adjust the metrics utilities
run: |
chmod a+x $spm
chmod a+x $compare
python -m pip install --upgrade pip
pip install -r $pip_requirements
- name: Genarate a report
run: |
$spm --module github.com/kyma-project/lifecycle-manager --path ${{ github.workspace }}/target --out $target_metrics
$spm --module github.com/kyma-project/lifecycle-manager --path ${{ github.workspace }}/base --out $base_metrics
$compare --base $base_metrics --target $target_metrics