Skip to content

Commit 45a3504

Browse files
committed
Add unit tests to CI workflow and clean up dependencies
- Add unit-tests job to build-and-test.yaml for Python 3.8 - Keep existing vulnerability-scan job using shared action - Add dev dependencies (pytest, pytest-cov, unittest-xml-reporting) to pyproject.toml - Remove setuptools from runtime dependencies (only needed for build) - Tested locally: 287 tests pass successfully
1 parent 9726026 commit 45a3504

File tree

2 files changed

+32
-3
lines changed

2 files changed

+32
-3
lines changed

.github/workflows/build-and-test.yaml

Lines changed: 24 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,31 @@ name: Build and Test
22
on: [pull_request, push, workflow_dispatch]
33

44
jobs:
5-
build:
5+
vulnerability-scan:
66
uses: IABTechLab/uid2-shared-actions/.github/workflows/shared-build-and-test.yaml@v3
77
secrets: inherit
88
with:
99
vulnerability_scan_only: true
10+
11+
unit-tests:
12+
runs-on: ubuntu-latest
13+
strategy:
14+
matrix:
15+
python-version: ["3.8"]
16+
17+
steps:
18+
- uses: actions/checkout@v4
19+
20+
- name: Set up Python ${{ matrix.python-version }}
21+
uses: actions/setup-python@v4
22+
with:
23+
python-version: ${{ matrix.python-version }}
24+
25+
- name: Install dependencies
26+
run: |
27+
python -m pip install --upgrade pip
28+
pip install -e .[dev]
29+
30+
- name: Run unit tests
31+
run: |
32+
python -m unittest tests/*.py

pyproject.toml

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,11 +24,17 @@ classifiers = [
2424
]
2525
requires-python = ">=3.8"
2626
dependencies = [
27-
"setuptools",
2827
"pycryptodome",
2928
"bitarray"
3029
]
31-
keywords = ["uid2"]
30+
31+
[project.optional-dependencies]
32+
dev = [
33+
"pytest",
34+
"pytest-cov",
35+
"unittest-xml-reporting"
36+
]
37+
keywords = ["uid2","euid"]
3238
[project.license]
3339
file="LICENSE"
3440
[project.urls]

0 commit comments

Comments
 (0)