Skip to content

Merge pull request #236 from blink1073/cleanup-ci #211

Merge pull request #236 from blink1073/cleanup-ci

Merge pull request #236 from blink1073/cleanup-ci #211

Workflow file for this run

name: tests
on: [push, pull_request]
jobs:
pre-commit:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v3
with:
python-version: 3.8
- uses: pre-commit/[email protected]
tests:
strategy:
matrix:
python-version: ["3.8", "3.9", "3.10", "3.11", " 3.12"]
os: [ubuntu-latest]
include:
- os: windows-latest
python-version: "3.12"
- os: macos-latest
python-version: "3.12"
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v3
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
python -m bash_kernel.install # For testing a non-standard kernel
pip install .
- name: Run tests
run: pytest
docs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v3
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
pip install .
- name: Build docs
run: |
cd doc
make html-strict
publish:
name: Publish to PyPi
needs: [tests]
if: github.event_name == 'push' && startsWith(github.event.ref, 'refs/tags')
runs-on: ubuntu-latest
steps:
- name: Checkout source
uses: actions/checkout@v2
- name: Set up Python 3.8
uses: actions/setup-python@v1
with:
python-version: 3.8
- name: Build package
run: |
pip install wheel
python setup.py sdist bdist_wheel
- name: Publish
uses: pypa/[email protected]
with:
user: __token__
password: ${{ secrets.PYPI_KEY }}