Skip to content

Commit 1297570

Browse files
committed
publish action try #6
1 parent 7815b05 commit 1297570

File tree

1 file changed

+9
-7
lines changed

1 file changed

+9
-7
lines changed

.github/workflows/pypi-release.yml

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -37,18 +37,20 @@ jobs:
3737
TWINE_PASSWORD: ${{ secrets.TEST_PYPI_TOKEN }}
3838
run: twine upload dist/* --skip-existing --repository=testpypi
3939

40-
- name: Test installing from test PyPI and running tests
41-
run: |
42-
python -m pip install uv
43-
uv pip install --system -i https://testpypi.python.org/pypi --extra-index-url https://pypi.org/simple datatrove[testing]
44-
python -m nltk.downloader punkt
45-
make test
46-
4740
- name: Get tag name
4841
id: get_tag_name
4942
run: |
5043
echo TAG_NAME=$(grep '^version' pyproject.toml | head -1 | cut -d '"' -f 2) >> $GITHUB_OUTPUT
5144
45+
- name: Test installing from test PyPI and running tests
46+
# install the wheel we just uploaded to testpypi directly, and all other dependencies from normal pypi
47+
# uses the version number to fetch the url of the .whl file
48+
run: |
49+
python -m pip install uv
50+
uv pip install --system datatrove[testing]@$(curl -s https://test.pypi.org/simple/datatrove/ | grep ${{ steps.get_tag_name.outputs.TAG_NAME }}-py3 | sed -nE 's/.*href="([^"]+)".*/\1/p')
51+
python -m nltk.downloader punkt
52+
python -m pytest -sv ./tests/
53+
5254
- name: Tag the release
5355
uses: actions/github-script@v7
5456
with:

0 commit comments

Comments
 (0)