Skip to content

Commit 6894cc1

Browse files
committed
refactor: split up tests into integration and unit tests
1 parent 9a07c5f commit 6894cc1

File tree

5 files changed

+32
-3
lines changed

5 files changed

+32
-3
lines changed

.github/workflows/ci.yml

Lines changed: 27 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,8 @@ name: CI
33
permissions: {}
44

55
on:
6-
pull_request: [opened, synchronize]
6+
pull_request:
7+
types: [opened, synchronize]
78
push:
89
branches:
910
- main
@@ -60,7 +61,7 @@ jobs:
6061
- name: Run Ruff
6162
run: uv run ruff format --check
6263

63-
test:
64+
unit-tests:
6465
runs-on: ${{ matrix.os }}
6566
strategy:
6667
matrix:
@@ -81,4 +82,27 @@ jobs:
8182
- name: Install the project
8283
run: uv sync --locked --all-extras --dev
8384
- name: Run Ruff
84-
run: uv run pytest --cov=debmagic
85+
run: uv run pytest tests/unit --cov=debmagic
86+
87+
integration-tests:
88+
runs-on: ${{ matrix.os }}
89+
strategy:
90+
matrix:
91+
python-version:
92+
- "3.12"
93+
- "3.13"
94+
os: [ubuntu-latest]
95+
steps:
96+
- uses: actions/checkout@v5
97+
- name: Set up Python
98+
uses: actions/setup-python@v6
99+
with:
100+
python-version: "3.12"
101+
- name: Install uv
102+
uses: astral-sh/setup-uv@v6
103+
with:
104+
enable-cache: true
105+
- name: Install the project
106+
run: uv sync --locked --all-extras --dev
107+
- name: Run Ruff
108+
run: uv run pytest tests/integration
File renamed without changes.
File renamed without changes.
File renamed without changes.

tests/unit/test_basic.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
def test_v0_imports():
2+
from debmagic.v0 import dh
3+
4+
preset_instance = dh.Preset()
5+
assert preset_instance is not None

0 commit comments

Comments
 (0)