Add commit to git blame ignore revs #14
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: Check test and code linting | |
on: [push] | |
jobs: | |
lint: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: pre-commit/[email protected] | |
test: | |
runs-on: ubuntu-latest | |
needs: lint | |
strategy: | |
matrix: | |
include: | |
- python-version: "3.8" | |
tox: min | |
- python-version: "3.9" | |
- python-version: "3.10" | |
- python-version: "3.11" | |
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 --upgrade pip | |
pip install tox codecov | |
- name: Run tests | |
run: tox -e ${{ matrix.tox || 'py' }} | |
publish: | |
runs-on: ubuntu-latest | |
needs: test | |
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags') | |
steps: | |
- uses: actions/checkout@master | |
- name: Set up Python 3.11 | |
uses: actions/setup-python@v3 | |
with: | |
python-version: "3.11" | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
python -m pip install --upgrade build | |
pip install setuptools wheel twine | |
- name: Build and publish | |
env: | |
TWINE_USERNAME: __token__ | |
TWINE_PASSWORD: ${{ secrets.PYPI_TOKEN }} | |
run: | | |
python -m build | |
twine upload dist/* |