Skip to content

Adapt to level config to match other Jupyter repos #220

Adapt to level config to match other Jupyter repos

Adapt to level config to match other Jupyter repos #220

Workflow file for this run

name: tests
on:
push:
branches: ["main"]
pull_request:
schedule:
- cron: "0 8 * * *"
jobs:
pre-commit:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v3
with:
python-version: "3.10"
- uses: pre-commit/action@v2.0.0
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 hatch
- name: Run tests
run: hatch run test:test
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 hatch
- name: Build docs
run: |
hatch run doc:build
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/gh-action-pypi-publish@v1.1.0
with:
user: __token__
password: ${{ secrets.PYPI_KEY }}