Skip to content

Commit 04abf33

Browse files
committed
Fix CI
1 parent e3d6e83 commit 04abf33

File tree

3 files changed

+52
-33
lines changed

3 files changed

+52
-33
lines changed

.github/workflows/test.yml

Lines changed: 46 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1,61 +1,62 @@
11
name: Tests
22
on: [push, pull_request]
3+
34
jobs:
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:

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ it.
1414
- **Compression**. Configure if the files should be stored as raw json or as json
1515
compressed with zlib.
1616
- **Fast**. Key-value pairs inside a json file can be accessed quickly and efficiently because the keys are indexed.
17-
- **Tested** with 99%+ coverage.
17+
- **Tested** with 98%+ coverage on Python 3.8 to 3.13.
1818

1919
### Why use DictDataBase
2020
- Your application concurrently reads and writes data from multiple processes or threads.

justfile

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,23 @@
1-
alias t := test
2-
alias p := profiler
3-
alias bp := benchmark_parallel
4-
alias bt := benchmark_threaded
5-
alias ba := benchmark_async
6-
71
default:
82
@just --list
93

4+
alias t := test
105
test:
116
poetry run pytest --cov=dictdatabase --cov-report term-missing
127
rm ./.coverage
138

9+
alias p := profiler
1410
profiler:
1511
poetry run python profiler.py
1612

13+
alias bp := benchmark_parallel
1714
benchmark_parallel:
1815
poetry run python tests/benchmark/run_parallel.py
1916

17+
alias bt := benchmark_threaded
2018
benchmark_threaded:
2119
poetry run python tests/benchmark/run_threaded.py
2220

21+
alias ba := benchmark_async
2322
benchmark_async:
2423
poetry run python tests/benchmark/run_async.py

0 commit comments

Comments
 (0)