Skip to content

Bump peaceiris/actions-gh-pages from 3.9.3 to 4.0.0 #113

Bump peaceiris/actions-gh-pages from 3.9.3 to 4.0.0

Bump peaceiris/actions-gh-pages from 3.9.3 to 4.0.0 #113

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@v4
- name: Set up python ${{ matrix.python-version }}
uses: actions/setup-python@v5
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@v4
- name: Set up python 3.10
uses: actions/setup-python@v5
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/[email protected]
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@v4
- name: Set up python 3.10
uses: actions/setup-python@v5
with:
python-version: "3.10"
architecture: x64
- name: Build
run: |
pip install wheel
python setup.py sdist bdist_wheel
- name: Deploy
uses: pypa/[email protected]
with:
user: __token__
password: ${{ secrets.PYPI_TOKEN }}