bump version v1.19.0 -> v1.20.0 #190
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: ci | |
on: push | |
permissions: | |
contents: write | |
jobs: | |
test: | |
runs-on: ubuntu-latest | |
env: | |
MINIMUM_COVERAGE_PERCENTAGE: 100 | |
strategy: | |
fail-fast: false | |
matrix: | |
python_version: ['3.8', '3.9', '3.10', '3.11'] | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-python@v4 | |
with: | |
python-version: ${{ matrix.python_version }} | |
- name: install dependencies | |
run: python3 -m pip install .[dev] | |
- name: reformat # neccessary to fix 100% coverage | |
run: | | |
autopep8 --in-place --aggressive --aggressive pipe21.py | |
black pipe21.py | |
- name: test | |
run: pytest --cov pipe21 --cov-fail-under=${{ env.MINIMUM_COVERAGE_PERCENTAGE }} | |
- name: doctest | |
run: python3 -m doctest docs/reference.md | |
- name: Upload coverage data to coveralls.io | |
run: coveralls --service=github | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
COVERALLS_FLAG_NAME: ${{ matrix.python_version }} | |
COVERALLS_PARALLEL: true | |
# - name: pre-commit | |
# run: pre-commit run --all-files | |
coveralls: | |
name: Indicate completion to coveralls.io | |
needs: test | |
runs-on: ubuntu-latest | |
container: python:3-slim | |
steps: | |
- name: Finished | |
run: | | |
pip3 install --upgrade coveralls | |
coveralls --service=github --finish | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
publish-to-pypi-and-github-release: | |
if: "startsWith(github.ref, 'refs/tags/')" | |
runs-on: ubuntu-latest | |
needs: test | |
steps: | |
- uses: actions/checkout@master | |
- name: Set up Python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: '3.11' | |
- name: Install pypa/build | |
run: python -m pip install --upgrade setuptools build twine | |
- name: Build a source tarball and wheel | |
run: python -m build . | |
- name: Upload to PyPI | |
env: | |
TWINE_USERNAME: __token__ | |
TWINE_PASSWORD: ${{ secrets.PYPI_API_TOKEN }} | |
run: python -m twine upload dist/* | |
- name: Github Release | |
uses: softprops/action-gh-release@v1 | |
mkdocs-github-pages: | |
if: "!startsWith(github.ref, 'refs/tags/')" | |
needs: test | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-python@v4 | |
with: | |
python-version: 3.11 | |
- uses: actions/cache@v3 | |
with: | |
key: ${{ github.ref }} | |
path: .cache | |
- run: pip install mkdocs-material | |
- run: mkdocs gh-deploy --force |