From 714a0824e66d0bb3dd976553c89866549531a692 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcel=20Kr=C3=B6ker?= Date: Thu, 14 Nov 2024 16:04:56 +0100 Subject: [PATCH] Apply fix --- .github/workflows/test.yml | 55 +++++++++++++++++++++++++------------- 1 file changed, 37 insertions(+), 18 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index cb90163..e1c728a 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -1,8 +1,9 @@ name: Tests on: [push, pull_request] + jobs: - # JOB + # JOB: Tests tests-job: runs-on: ubuntu-latest @@ -24,30 +25,30 @@ jobs: cache: 'poetry' #---------------------------------------------- - #---- install dependencies + #---- Install dependencies #---------------------------------------------- - - name: poetry install + - name: Poetry install run: poetry install #---------------------------------------------- - #---- show installation details + #---- Show installation details #---------------------------------------------- - - name: poetry --version + - name: Poetry version run: poetry --version - - name: python --version in venv + - name: Python version in venv run: poetry run python --version - - name: ls -lah + - name: List files run: ls -lah - - name: poetry show + - name: Poetry show run: poetry show #---------------------------------------------- #---- Pre-Checks #---------------------------------------------- - - name: Show clock res + - name: Show clock resolution run: poetry run python tests/system_checks/test_tick_rate.py - name: Test clocks run: poetry run python tests/system_checks/test_clocks.py @@ -55,7 +56,7 @@ jobs: run: poetry run python tests/system_checks/test_monotonic_over_threads.py #---------------------------------------------- - #---- Tests + #---- Run tests with coverage report #---------------------------------------------- - name: 🚀 Run tests with code coverage report @@ -64,39 +65,57 @@ jobs: #---------------------------------------------- #---- Save coverage artifact #---------------------------------------------- + + - name: Debug coverage file + run: ls -lah - uses: actions/upload-artifact@v4 with: name: coverage - path: .coverage + path: "**/.coverage" + retention-days: 1 - # JOB + # JOB: Coverage Badge cov-badge-job: needs: tests-job runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 + #---------------------------------------------- - #---- Coverage badge + #---- Download and debug artifact #---------------------------------------------- - - name: ls-lah + + - name: Debug workspace run: ls -lah - uses: actions/download-artifact@v4 with: name: coverage + path: . + + - name: Debug downloaded artifact + run: ls -lah - - name: GenerateCoverage Badge + #---------------------------------------------- + #---- Generate coverage badge + #---------------------------------------------- + + - name: Generate Coverage Badge uses: tj-actions/coverage-badge-py@v2 with: output: assets/coverage.svg - - name: Verify Changed files + #---------------------------------------------- + #---- Verify and commit changes + #---------------------------------------------- + + - name: Verify Changed Files uses: tj-actions/verify-changed-files@v16 id: changed_files with: files: assets/coverage.svg - - name: Commit files + - name: Commit Files if: steps.changed_files.outputs.files_changed == 'true' run: | git config --local user.email "github-actions[bot]@users.noreply.github.com" @@ -104,7 +123,7 @@ jobs: git add assets/coverage.svg git commit -m "Updated assets/coverage.svg" - - name: Push changes + - name: Push Changes if: steps.changed_files.outputs.files_changed == 'true' uses: ad-m/github-push-action@master with: