Skip to content

Commit

Permalink
Apply fix
Browse files Browse the repository at this point in the history
  • Loading branch information
marcelkroeker committed Nov 14, 2024
1 parent 0f0c9c3 commit 714a082
Showing 1 changed file with 37 additions and 18 deletions.
55 changes: 37 additions & 18 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
name: Tests
on: [push, pull_request]

jobs:

# JOB
# JOB: Tests
tests-job:
runs-on: ubuntu-latest

Expand All @@ -24,38 +25,38 @@ 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
- name: Test monotonicity
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
Expand All @@ -64,47 +65,65 @@ 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"
git config --local user.name "github-actions[bot]"
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:
Expand Down

0 comments on commit 714a082

Please sign in to comment.