Skip to content

Commit 37552db

Browse files
committed
tests: run tests before build
1 parent 8b2fed9 commit 37552db

File tree

1 file changed

+21
-16
lines changed

1 file changed

+21
-16
lines changed

.github/workflows/publish.yml

Lines changed: 21 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -8,19 +8,24 @@ jobs:
88
deploy:
99
runs-on: ubuntu-latest
1010
steps:
11-
- uses: actions/checkout@v1
12-
- name: Set up Python
13-
uses: actions/setup-python@v1
14-
with:
15-
python-version: '3.x'
16-
- name: Install dependencies
17-
run: |
18-
python -m pip install --upgrade pip
19-
pip install setuptools wheel twine
20-
- name: Build and publish
21-
env:
22-
TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }}
23-
TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
24-
run: |
25-
python setup.py sdist bdist_wheel
26-
twine upload dist/*
11+
- uses: actions/checkout@v1
12+
- name: Set up Python
13+
uses: actions/setup-python@v1
14+
with:
15+
python-version: "3.x"
16+
- name: Install Tox and any other packages
17+
run: |
18+
python -m pip install --upgrade pip
19+
pip install -r requirements/test.txt
20+
- name: Run Tox
21+
run: tox -e py
22+
- name: Install build dependencies
23+
run: |
24+
pip install setuptools wheel twine
25+
- name: Build and publish
26+
env:
27+
TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }}
28+
TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
29+
run: |
30+
python setup.py sdist bdist_wheel
31+
twine upload dist/*

0 commit comments

Comments
 (0)