Skip to content

Format/lint with ruff, check types with mypy, add py.typed #2

Format/lint with ruff, check types with mypy, add py.typed

Format/lint with ruff, check types with mypy, add py.typed #2

Workflow file for this run

name: ci
on:
push:
branches: [ main ]
tags:
- 'v*'
pull_request:
branches: [ main ]
jobs:
check:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.10'
- name: Install poetry
uses: abatilo/actions-poetry@v2
- name: Install dependencies
run: |
poetry install --with dev
- name: Lint
run: poetry run ruff check
- name: Format check
run: poetry run ruff format --check
- name: Type check
run: poetry run mypy
publish:
runs-on: ubuntu-latest
needs: check
if: startsWith(github.ref, 'refs/tags/v')
steps:
- uses: actions/checkout@v4
- name: Build and publish to pypi
uses: JRubics/poetry-publish@v1.16
with:
pypi_token: ${{ secrets.PYPI_TOKEN }}