fix ci yml
All checks were successful
Python CI / test (push) Successful in 1m14s

This commit is contained in:
Duncan Tourolle 2025-06-07 15:42:37 +02:00
parent c39b9f9eb7
commit 0e10f51bff

View File

@ -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
@ -60,24 +59,20 @@ jobs:
run: | run: |
# Generate coverage summary for README # Generate coverage summary for README
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')
" "
- name: Upload coverage artifacts - name: Upload coverage artifacts
uses: actions/upload-artifact@v3 uses: actions/upload-artifact@v3