This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Upload package to pypi | |
on: | |
release: | |
types: | |
- published | |
jobs: | |
ci: | |
runs-on: ubuntu-18.04 | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: actions/setup-python@v2 | |
- name: Install dependencies | |
run: | | |
python3 -m pip install --upgrade pip | |
pip3 install setuptools wheel twine | |
pip install . | |
pip install -r requirements/dev.txt | |
- name: Test with pytest | |
run: | | |
docker-compose -f docker-compose.yaml up -d | |
sleep 45 | |
pytest -s -v -k "not SSL" | |
working-directory: tests | |
- name: Test SSL connection with pytest | |
run: | | |
enable_ssl=true docker-compose -f docker-compose-ssl.yaml up -d | |
sleep 45 | |
pytest -s -v -k "SSL" | |
working-directory: tests | |
- name: Build and publish | |
env: | |
TWINE_USERNAME: ${{ secrets.PYPI_NAME }} | |
TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }} | |
run: | | |
python3 setup.py sdist bdist_wheel | |
twine upload dist/* |