Skip to content

Commit

Permalink
publish action try #6
Browse files Browse the repository at this point in the history
  • Loading branch information
guipenedo committed Aug 28, 2024
1 parent 7815b05 commit 1297570
Showing 1 changed file with 9 additions and 7 deletions.
16 changes: 9 additions & 7 deletions .github/workflows/pypi-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,18 +37,20 @@ jobs:
TWINE_PASSWORD: ${{ secrets.TEST_PYPI_TOKEN }}
run: twine upload dist/* --skip-existing --repository=testpypi

- name: Test installing from test PyPI and running tests
run: |
python -m pip install uv
uv pip install --system -i https://testpypi.python.org/pypi --extra-index-url https://pypi.org/simple datatrove[testing]
python -m nltk.downloader punkt
make test
- name: Get tag name
id: get_tag_name
run: |
echo TAG_NAME=$(grep '^version' pyproject.toml | head -1 | cut -d '"' -f 2) >> $GITHUB_OUTPUT
- name: Test installing from test PyPI and running tests
# install the wheel we just uploaded to testpypi directly, and all other dependencies from normal pypi
# uses the version number to fetch the url of the .whl file
run: |
python -m pip install uv
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')
python -m nltk.downloader punkt
python -m pytest -sv ./tests/
- name: Tag the release
uses: actions/github-script@v7
with:
Expand Down

0 comments on commit 1297570

Please sign in to comment.