Merge pull request #7 from MrSampson/main #15
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: Building | |
on: [push] | |
jobs: | |
build: | |
name: Run Python Tests and upload to PyPI | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Set up Python 3.8 | |
uses: actions/setup-python@v2 | |
with: | |
python-version: 3.8 | |
- name: Install pytest | |
run: | | |
pip3 install pytest==6.2.5 pytest-cov==3.0.0 | |
- name: Install Python dependencies | |
run: | | |
python3 -m pip install --upgrade pip | |
pip3 install -r requirements.txt | |
- name: Test with pytest | |
run: | | |
pytest . --doctest-modules --exitfirst --verbose --failed-first \ | |
--cov=. --cov-report html | |
- name: Build and Upload to TestPyPI | |
continue-on-error: true | |
run: | | |
pip3 install wheel twine | |
python3 setup.py sdist bdist_wheel | |
python3 -m twine upload dist/* | |
env: | |
TWINE_USERNAME: __token__ | |
TWINE_PASSWORD: ${{ secrets.TWINE_TOKEN }} | |
TWINE_REPOSITORY: pypi |