Skip to content

Commit 044fd8b

Browse files
authored
chore: tox fix for pypi (#181) (#182)
1 parent 64bcae3 commit 044fd8b

3 files changed

Lines changed: 33 additions & 2 deletions

File tree

.github/workflows/deploy.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ jobs:
3333
- name: Check long description is OK for PyPI with tox
3434
run: |
3535
python -m pip install --upgrade pip
36-
python -m pip install tox
36+
python -m pip install tox sphinx
3737
tox -e pypi
3838
3939
- name: Build a binary wheel and a source tarball

.github/workflows/test.yml

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -91,3 +91,34 @@ jobs:
9191
python -m pip install tox
9292
- name: Testing with tox
9393
run: python -m tox -e docs
94+
95+
check-pypi:
96+
name: Long description check for PyPI
97+
runs-on: ubuntu-latest
98+
steps:
99+
- name: Checkout the repo
100+
uses: actions/checkout@v2
101+
- name: Set up Python 3.7
102+
uses: actions/setup-python@v2
103+
with:
104+
python-version: "3.7"
105+
- name: Update pip
106+
run: python -m pip install --upgrade pip
107+
- name: Get pip cache dir
108+
id: pip-cache
109+
run: |
110+
echo "::set-output name=dir::$(pip cache dir)"
111+
- name: Get current week number
112+
id: get-week
113+
shell: bash
114+
run: echo "::set-output name=week::$(date +'%V')"
115+
- name: Pip cache
116+
uses: actions/cache@v2
117+
with:
118+
path: ${{ steps.pip-cache.outputs.dir }}
119+
key: ${{ runner.os }}-pip-${{ steps.get-week.outputs.week }}-${{ hashFiles('setup.py') }}
120+
- name: Install tox and sphinx (to have rst2html.py utility available)
121+
run: |
122+
python -m pip install tox sphinx
123+
- name: Testing with tox
124+
run: python -m tox -e pypi

tox.ini

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ passenv = HOME
6464
skip_install = true
6565
# To prevent from installing eodag and the dev deps set in testenv
6666
deps =
67-
allowlist_externals = /bin/bash
67+
allowlist_externals = bash
6868
commands =
6969
# Check that the long description is ready to be published on PyPI without errors
7070
bash -c 'ERROR=$(\{ python setup.py --long-description | rst2html.py >/dev/null;\} 2>&1) && if [[ ! -z $ERROR ]];'\

0 commit comments

Comments
 (0)