File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 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
You can’t perform that action at this time.
0 commit comments