Skip to content

Bump pypa/gh-action-pypi-publish from 1.6.4 to 1.8.5 #92

Bump pypa/gh-action-pypi-publish from 1.6.4 to 1.8.5

Bump pypa/gh-action-pypi-publish from 1.6.4 to 1.8.5 #92

Workflow file for this run

name: CI
# run on all pushes, pull requests to master, and allow manual runs
on:
push:
pull_request:
branches: [ master ]
workflow_dispatch:
jobs:
test:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python-version: ["3.7", "3.8", "3.9", "3.10"]
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Set up python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
architecture: x64
- name: Install
run: |
pip install pycodestyle pytest pytest-cov codecov
pip install .
- name: Style check
run: find . -name "*.py" -exec pycodestyle --ignore E501,W503 {} +
- name: Tests
run: pytest -v
- name: Coverage
run: codecov
docs:
runs-on: ubuntu-latest
# only run when tests succeed
needs: test
# run on master branch or tags
if: github.ref == 'refs/heads/master' || startsWith(github.ref, 'refs/tags')
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Set up python 3.10
uses: actions/setup-python@v4
with:
python-version: "3.10"
architecture: x64
- name: Install
run: |
pip install sphinx sphinx_rtd_theme
pip install .
- name: Build
run: |
make -C docs/ html
touch docs/_build/html/.nojekyll
- name: Deploy
uses: peaceiris/actions-gh-pages@v3.9.2
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: docs/_build/html
pypi:
runs-on: ubuntu-latest
needs: [test, docs]
# run on tags
if: startsWith(github.ref, 'refs/tags')
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Set up python 3.10
uses: actions/setup-python@v4
with:
python-version: "3.10"
architecture: x64
- name: Build
run: |
pip install wheel
python setup.py sdist bdist_wheel
- name: Deploy
uses: pypa/gh-action-pypi-publish@v1.8.5
with:
user: __token__
password: ${{ secrets.PYPI_TOKEN }}