11name : Tests
22on : [push, pull_request]
3+
34jobs :
45
5- # JOB
6+ # JOB: Tests
67 tests-job :
78 runs-on : ubuntu-latest
89
910 strategy :
1011 matrix :
11- python-version : ["3.8", "3.9", "3.10", "3.11", "3.12"]
12+ python-version : ["3.8", "3.9", "3.10", "3.11", "3.12", "3.13" ]
1213
1314 steps :
1415 # ----------------------------------------------
1516 # ---- Checkout and install poetry and python
1617 # ----------------------------------------------
1718
18- - uses : actions/checkout@v3
19+ - uses : actions/checkout@v4
1920 - name : Install poetry
2021 run : pipx install poetry
21- - uses : actions/setup-python@v4
22+ - uses : actions/setup-python@v5
2223 with :
2324 python-version : ${{ matrix.python-version }}
2425 cache : ' poetry'
2526
2627 # ----------------------------------------------
27- # ---- install dependencies
28+ # ---- Install dependencies
2829 # ----------------------------------------------
2930
30- - name : poetry install
31+ - name : Poetry install
3132 run : poetry install
3233
3334 # ----------------------------------------------
34- # ---- show installation details
35+ # ---- Show installation details
3536 # ----------------------------------------------
3637
37- - name : poetry -- version
38+ - name : Poetry version
3839 run : poetry --version
39- - name : python -- version in venv
40+ - name : Python version in venv
4041 run : poetry run python --version
41- - name : ls -lah
42+ - name : List files
4243 run : ls -lah
43- - name : poetry show
44+ - name : Poetry show
4445 run : poetry show
4546
4647 # ----------------------------------------------
4748 # ---- Pre-Checks
4849 # ----------------------------------------------
4950
50- - name : Show clock res
51+ - name : Show clock resolution
5152 run : poetry run python tests/system_checks/test_tick_rate.py
5253 - name : Test clocks
5354 run : poetry run python tests/system_checks/test_clocks.py
5455 - name : Test monotonicity
5556 run : poetry run python tests/system_checks/test_monotonic_over_threads.py
5657
5758 # ----------------------------------------------
58- # ---- Tests
59+ # ---- Run tests with coverage report
5960 # ----------------------------------------------
6061
6162 - name : 🚀 Run tests with code coverage report
@@ -64,47 +65,66 @@ jobs:
6465 # ----------------------------------------------
6566 # ---- Save coverage artifact
6667 # ----------------------------------------------
67- - uses : actions/upload-artifact@v3
68+
69+ - name : Debug coverage file
70+ run : ls -lah
71+ - uses : actions/upload-artifact@v4
6872 with :
69- name : coverage
70- path : .coverage
73+ name : coverage-${{ matrix.python-version }}
74+ include-hidden-files : true
75+ if-no-files-found : error
76+ path : " .coverage"
7177
72- # JOB
78+ # JOB: Coverage Badge
7379 cov-badge-job :
7480 needs : tests-job
7581 runs-on : ubuntu-latest
7682 steps :
77- - uses : actions/checkout@v3
83+ - uses : actions/checkout@v4
84+
7885 # ----------------------------------------------
79- # ---- Coverage badge
86+ # ---- Download and debug artifact
8087 # ----------------------------------------------
81- - name : ls-lah
88+
89+ - name : Debug workspace
8290 run : ls -lah
8391
84- - uses : actions/download-artifact@v3
92+ - uses : actions/download-artifact@v4
8593 with :
86- name : coverage
94+ name : coverage-3.12
95+ path : .
96+
97+ - name : Debug downloaded artifact
98+ run : ls -lah
8799
88- - name : GenerateCoverage Badge
100+ # ----------------------------------------------
101+ # ---- Generate coverage badge
102+ # ----------------------------------------------
103+
104+ - name : Generate Coverage Badge
89105 uses : tj-actions/coverage-badge-py@v2
90106 with :
91107 output : assets/coverage.svg
92108
93- - name : Verify Changed files
109+ # ----------------------------------------------
110+ # ---- Verify and commit changes
111+ # ----------------------------------------------
112+
113+ - name : Verify Changed Files
94114 uses : tj-actions/verify-changed-files@v16
95115 id : changed_files
96116 with :
97117 files : assets/coverage.svg
98118
99- - name : Commit files
119+ - name : Commit Files
100120 if : steps.changed_files.outputs.files_changed == 'true'
101121 run : |
102122 git config --local user.email "github-actions[bot]@users.noreply.github.com"
103123 git config --local user.name "github-actions[bot]"
104124 git add assets/coverage.svg
105125 git commit -m "Updated assets/coverage.svg"
106126
107- - name : Push changes
127+ - name : Push Changes
108128 if : steps.changed_files.outputs.files_changed == 'true'
109129 uses : ad-m/github-push-action@master
110130 with :
0 commit comments