mirror of
https://github.com/huggingface/xet-core.git
synced 2026-06-04 13:30:29 +08:00
add ci steps to check cargo.lock is up to date (#377)
We keep having out of date hf_xet/Cargo.lock, likely people are not building hf_xet 100% of the time they are pushing to the repo. This PR enforces that hf_xet/Cargo.lock and the root Cargo.lock must be up to date, a CI job will fail if this is not true.
This commit is contained in:
4
.github/workflows/ci.yml
vendored
4
.github/workflows/ci.yml
vendored
@@ -40,6 +40,10 @@ jobs:
|
||||
- name: Build and Test
|
||||
run: |
|
||||
cargo test --verbose --no-fail-fast --features "strict"
|
||||
- name: Check Cargo.lock has no uncommitted changes
|
||||
run: |
|
||||
# the build and test steps would update Cargo.lock if it is out of date
|
||||
test -z "$(git status --porcelain Cargo.lock)" || (echo "Cargo.lock has uncommitted changes!" && exit 1)
|
||||
build_and_test-win:
|
||||
runs-on: windows-latest
|
||||
steps:
|
||||
|
||||
8
.github/workflows/hf-xet-tests.yml
vendored
8
.github/workflows/hf-xet-tests.yml
vendored
@@ -17,7 +17,7 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
# checkout out xet-core
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/checkout@v4
|
||||
# checkout out huggingface_hub
|
||||
- uses: actions/checkout@v4
|
||||
with:
|
||||
@@ -41,4 +41,8 @@ jobs:
|
||||
- name: Run huggingface_hub xet tests
|
||||
run: |
|
||||
source .venv/bin/activate
|
||||
pytest huggingface_hub/tests/test_xet_*.py
|
||||
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
|
||||
test -z "$(git status --porcelain hf_xet/Cargo.lock)" || (echo "hf_xet/Cargo.lock has uncommitted changes!" && exit 1)
|
||||
Reference in New Issue
Block a user