Merge pull request #65 from timgates42/bugfix_typo_asymmetric #53
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
on: [push, pull_request] | |
jobs: | |
test: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
python: ["3.6", "3.7", "3.8"] | |
name: Test Python ${{ matrix.python }} | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Set up Python ${{ matrix.python }} | |
uses: actions/setup-python@v1 | |
with: | |
python-version: ${{ matrix.python }} | |
- name: Install dependencies | |
run: | | |
python -m pip install -e .[testing] | |
- name: Run tests | |
run: py.test | |
style: | |
runs-on: ubuntu-latest | |
name: Code style | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Set up Python | |
uses: actions/setup-python@v1 | |
with: | |
python-version: 3.7 | |
- name: Install black | |
run: python -m pip install black | |
- name: Check code style | |
run: black --check . | |
release: | |
if: github.event_name == 'push' && startsWith(github.event.ref, 'refs/tags') | |
runs-on: ubuntu-latest | |
name: Release | |
needs: [ test, style ] | |
steps: | |
- uses: actions/checkout@v2 | |
with: | |
fetch-depth: 0 | |
- name: Set up Python | |
uses: actions/setup-python@v1 | |
with: | |
python-version: 3.7 | |
- name: Install wheel | |
run: python -m pip install wheel --user | |
- name: Insert version number | |
run: | | |
version=$(echo $GITHUB_REF | cut -d/ -f3) | |
sed -ie "/^version/s/=.*/= $version/" setup.cfg | |
- name: Generate changelog | |
uses: scottbrenner/generate-changelog-action@master | |
id: Changelog | |
env: | |
REPO: ${{ github.repository }} | |
- name: Build a binary wheel and a source tarball | |
run: python setup.py sdist bdist_wheel | |
- name: Publish package | |
uses: pypa/gh-action-pypi-publish@master | |
with: | |
user: __token__ | |
password: ${{ secrets.pypi_password }} | |
- name: Create GitHub Release | |
id: create_release | |
uses: actions/create-release@latest | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
tag_name: ${{ github.ref }} | |
release_name: Release ${{ github.ref }} | |
body: | | |
${{ steps.Changelog.outputs.changelog }} | |
draft: false | |
prerelease: false |