6
6
- " v*.rc*"
7
7
8
8
jobs :
9
- test_on_transformers :
9
+ trigger_rc_testing :
10
10
runs-on : ubuntu-latest
11
11
12
12
strategy :
32
32
git config user.name "Hugging Face Bot (RC Testing)"
33
33
git config user.email "[email protected] "
34
34
35
+ - name : Wait for prerelease to be out on PyPI
36
+ run : |
37
+ VERSION=${{ steps.get-version.outputs.VERSION }}
38
+ echo "Waiting for huggingface-hub==${VERSION} to be available on PyPI"
39
+ while ! pip install huggingface-hub==${VERSION}; do
40
+ echo "huggingface-hub==${VERSION} not available yet, retrying in 15s"
41
+ sleep 15
42
+ done
43
+
35
44
- name : Create test branch and update dependencies
36
45
id : create-pr
37
46
run : |
@@ -43,21 +52,25 @@ jobs:
43
52
git checkout -b $BRANCH_NAME
44
53
45
54
# Update dependencies using sed
46
- sed -i -E 's/ "huggingface-hub>=0.*"/ "huggingface-hub==${VERSION}"/' setup.py
55
+ sed -i -E "s/\ "huggingface-hub>=0.*\"/\ "huggingface-hub==${VERSION}\"/" setup.py
47
56
git add setup.py
48
57
49
58
# Only if the target repo is transformers
50
59
if [ "${{ matrix.target-repo }}" = "transformers" ]; then
51
- sed -i -E 's/ "huggingface-hub>=0.*"/ "huggingface-hub==${VERSION}"/' src/transformers/dependency_versions_table.py
60
+ sed -i -E "s/\ "huggingface-hub>=0.*\"/\ "huggingface-hub==${VERSION}\"/" src/transformers/dependency_versions_table.py
52
61
git add src/transformers/dependency_versions_table.py
53
62
fi
54
63
55
64
# Only if the target repo is diffusers
56
65
if [ "${{ matrix.target-repo }}" = "diffusers" ]; then
57
- sed -i -E 's/ "huggingface-hub":.*/"huggingface-hub": "huggingface-hub==${VERSION}",/' src/diffusers/dependency_versions_table.py
66
+ sed -i -E "s/\ "huggingface-hub\ ":.*/\ "huggingface-hub\ ": \ "huggingface-hub==${VERSION}\ ",/" src/diffusers/dependency_versions_table.py
58
67
git add src/diffusers/dependency_versions_table.py
59
68
fi
60
69
70
+ # Any line with `uv pip install --prerelease=allow` in the `.github/` folder must be updated with `--prerelease=allow` flag
71
+ find .github/workflows/ -type f -exec sed -i 's/uv pip install /uv pip install --prerelease=allow /g' {} +
72
+ git add .github/workflows/
73
+
61
74
# Commit and push changes
62
75
git --no-pager diff --staged
63
76
git commit -m "Test hfh ${VERSION}"
67
80
run : |
68
81
VERSION=${{ steps.get-version.outputs.VERSION }}
69
82
echo "https://github.com/huggingface/${{ matrix.target-repo }}/actions"
70
- echo "https://github.com/huggingface/${{ matrix.target-repo }}/compare/main...ci-test-huggingface-hub-${VERSION}"
83
+ echo "https://github.com/huggingface/${{ matrix.target-repo }}/compare/main...ci-test-huggingface-hub-${VERSION}"
0 commit comments