diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 9cfb5d7d..06d0727c 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -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: diff --git a/.github/workflows/hf-xet-tests.yml b/.github/workflows/hf-xet-tests.yml index 6a0189af..0b15d3ea 100644 --- a/.github/workflows/hf-xet-tests.yml +++ b/.github/workflows/hf-xet-tests.yml @@ -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 \ No newline at end of file + 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) \ No newline at end of file