Skip to content

Commit cb7316c

Browse files
committed
Update CI workflow and add pytest-cov to dev dependencies
Upgraded GitHub Actions to use newer versions and improved test steps by separating model benchmark and unit tests, adding coverage reporting with codecov. Added pytest-cov to dev dependencies and configured Ruff linter settings in pyproject.toml.
1 parent 81f9c9e commit cb7316c

2 files changed

Lines changed: 21 additions & 8 deletions

File tree

.github/workflows/testing.yml

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ jobs:
4343
df -h
4444
4545
- name: Checkout code
46-
uses: actions/checkout@v4
46+
uses: actions/checkout@v6
4747

4848
- name: Install uv
4949
uses: astral-sh/setup-uv@v6
@@ -55,7 +55,7 @@ jobs:
5555
- name: Install the project
5656
run: uv sync --no-cache --all-extras --dev
5757
shell: bash
58-
58+
5959
- name: Install ffmpeg
6060
run: |
6161
if [ "$RUNNER_OS" == "Linux" ]; then
@@ -67,9 +67,14 @@ jobs:
6767
choco install ffmpeg
6868
fi
6969
shell: bash
70-
71-
- name: Run DLC Live Tests
70+
71+
- name: Run Model Benchmark Test
7272
run: uv run dlc-live-test --nodisplay
7373

74-
- name: Run Functional Benchmark Test
75-
run: uv run pytest
74+
- name: Run DLC Live Unit Tests
75+
run: uv run pytest --cov=dlclive --cov-report=xml
76+
77+
- name: Coverage Report
78+
uses: codecov/codecov-action@v5
79+
with:
80+
files: ./coverage.xml

pyproject.toml

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,11 +61,12 @@ tf = [
6161
[dependency-groups]
6262
dev = [
6363
"pytest",
64+
"pytest-cov",
6465
"black",
6566
"ruff",
6667
]
6768

68-
# Keep only for backward compatibility with Poetry
69+
# Keep only for backward compatibility with Poetry
6970
# (without this section, Poetry assumes the wrong root directory of the project)
7071
[tool.poetry]
7172
packages = [
@@ -87,4 +88,11 @@ include-package-data = true
8788
include = ["dlclive*"]
8889

8990
[tool.setuptools.package-data]
90-
dlclive = ["check_install/*"]
91+
dlclive = ["check_install/*"]
92+
93+
[tool.ruff]
94+
lint.select = ["E", "F", "B", "I", "UP"]
95+
lint.ignore = ["E741"]
96+
target-version = "py310"
97+
fix = true
98+
line-length = 120

0 commit comments

Comments
 (0)