various fixes #81
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: Test and publish | |
on: [push] | |
jobs: | |
test: | |
name: Run tests | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
python-version: [3.7, 3.8, 3.9, '3.10', pypy-3.7, pypy-3.8, pypy-3.9] | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v2 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Install dependencies | |
run: | | |
python -m pip install -e . | |
python -m pip install -r test_requirements.txt | |
python -m pip install flake8 | |
python -m pip install isort | |
python -m pip install black | |
- name: Run checks | |
run: pymake checks | |
- name: Test with pytest | |
run: pymake covtest | |
publish: | |
needs: [test] | |
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags') | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Set up Python 3.9 | |
uses: actions/setup-python@v1 | |
with: | |
python-version: 3.9 | |
- name: Install dependencies | |
run: | | |
python -m pip install . | |
python -m pip install --upgrade build | |
python -m pip install --upgrade twine | |
- name: Check that tag matches package version | |
run: python check_tag.py | |
- name: Build and publish package | |
run: pymake publish | |
env: | |
TWINE_USERNAME: '__token__' | |
TWINE_PASSWORD: ${{secrets.PYPI_API_TOKEN}} |