-
Notifications
You must be signed in to change notification settings - Fork 64
53 lines (50 loc) · 1.45 KB
/
hf-xet-tests.yml
File metadata and controls
53 lines (50 loc) · 1.45 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
name: Test huggingface_hub xet tests
on:
push:
branches:
- main
tags:
- '*'
pull_request:
workflow_dispatch:
permissions:
contents: read
jobs:
hub-python-tests:
runs-on: ubuntu-latest
steps:
# checkout out xet-core
- uses: actions/checkout@v4
# checkout out huggingface_hub
- uses: actions/checkout@v4
with:
repository: huggingface/huggingface_hub
path: huggingface_hub
- uses: actions/setup-python@v5
with:
python-version: '3.10'
- name: Create venv
run: python3 -m venv .venv
- name: Build wheel
uses: PyO3/maturin-action@v1
with:
command: develop
sccache: 'true'
working-directory: hf_xet
- name: Install huggingface_hub dependencies
run: |
source .venv/bin/activate
python3 -m pip install -e 'huggingface_hub[testing]'
- name: Run huggingface_hub xet tests
run: |
source .venv/bin/activate
pytest huggingface_hub/tests/test_xet_*.py
- name: Check Cargo.lock has no uncommitted changes
run: |
# the Build wheel step would update hf_xet/Cargo.lock if it is out of date
if [ -n "$(git status --porcelain hf_xet/Cargo.lock)" ]; then
echo "::error::hf_xet/Cargo.lock has uncommitted changes!"
echo "Diff:"
git diff hf_xet/Cargo.lock
exit 1
fi