Skip to content

Commit 286ce31

Browse files
committed
ci(training): run focused HF CAS integrity tests
1 parent eebab59 commit 286ce31

1 file changed

Lines changed: 58 additions & 0 deletions

File tree

Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
name: HF Dataset CAS Tests
2+
3+
on:
4+
push:
5+
branches:
6+
- "feat/**"
7+
- "feature/**"
8+
pull_request:
9+
branches:
10+
- "main"
11+
- "master"
12+
- "feat/**"
13+
- "feature/**"
14+
paths:
15+
- "app/services/hf_dataset_cas.py"
16+
- "app/services/hf_dataset_service.py"
17+
- "packages/ocr_contracts/integrity_ledger.py"
18+
- "tests/test_hf_dataset_cas.py"
19+
- "tests/test_hf_dataset_integrity_ledger.py"
20+
- "tests/test_training_integrity_ledger.py"
21+
- ".github/workflows/hf-dataset-cas-tests.yml"
22+
23+
permissions:
24+
contents: read
25+
26+
jobs:
27+
targeted-tests:
28+
name: CAS and export-integrity unit tests
29+
runs-on: ubuntu-latest
30+
timeout-minutes: 20
31+
steps:
32+
- name: Checkout
33+
uses: actions/checkout@v4
34+
with:
35+
lfs: true
36+
37+
- name: Set up Python
38+
uses: actions/setup-python@v5
39+
with:
40+
python-version: "3.11"
41+
cache: pip
42+
43+
- name: Install test/runtime dependencies
44+
run: |
45+
python -m pip install --upgrade pip
46+
pip install pytest pytest-asyncio pandas pyarrow "huggingface-hub<1.0.0" datasets
47+
if [ -f requirements/api.txt ]; then pip install -r requirements/api.txt; fi
48+
if [ -f requirements/ml.txt ]; then pip install -r requirements/ml.txt; fi
49+
50+
- name: Run CAS and integrity tests (offline)
51+
env:
52+
HF_HUB_OFFLINE: "1"
53+
HF_DATASETS_OFFLINE: "1"
54+
run: |
55+
pytest -q \
56+
tests/test_hf_dataset_cas.py \
57+
tests/test_hf_dataset_integrity_ledger.py \
58+
tests/test_training_integrity_ledger.py

0 commit comments

Comments
 (0)