This commit is contained in:
parent
c39b9f9eb7
commit
0e10f51bff
@ -9,7 +9,6 @@ on:
|
|||||||
jobs:
|
jobs:
|
||||||
test:
|
test:
|
||||||
runs-on: self-hosted
|
runs-on: self-hosted
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout code
|
- name: Checkout code
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
@ -62,18 +61,14 @@ jobs:
|
|||||||
python -c "
|
python -c "
|
||||||
import json
|
import json
|
||||||
import os
|
import os
|
||||||
|
|
||||||
# Read coverage data
|
# Read coverage data
|
||||||
if os.path.exists('coverage.json'):
|
if os.path.exists('coverage.json'):
|
||||||
with open('coverage.json', 'r') as f:
|
with open('coverage.json', 'r') as f:
|
||||||
coverage_data = json.load(f)
|
coverage_data = json.load(f)
|
||||||
|
|
||||||
total_coverage = round(coverage_data['totals']['percent_covered'], 1)
|
total_coverage = round(coverage_data['totals']['percent_covered'], 1)
|
||||||
|
|
||||||
# Create coverage summary file
|
# Create coverage summary file
|
||||||
with open('coverage-summary.txt', 'w') as f:
|
with open('coverage-summary.txt', 'w') as f:
|
||||||
f.write(f'{total_coverage}%')
|
f.write(f'{total_coverage}%')
|
||||||
|
|
||||||
print(f'Test Coverage: {total_coverage}%')
|
print(f'Test Coverage: {total_coverage}%')
|
||||||
else:
|
else:
|
||||||
print('No coverage data found')
|
print('No coverage data found')
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user