continue-custom/.github/workflows/python.yaml
danieleades 1cad8b3f4b
add mypy (#684)
Co-authored-by: daniel.eades <daniel.eades@seebyte.com>
2024-01-05 12:56:16 -08:00

48 lines
1.2 KiB
YAML

on:
push:
branches: [main]
pull_request:
defaults:
run:
working-directory: ./server
jobs:
lint:
runs-on: ubuntu-latest
name: ${{ matrix.name }}
strategy:
fail-fast: false
matrix:
include:
- name: ruff
command: ruff check --output-format=github .
deps: --only lint-ruff
- name: mypy
command: mypy
deps: --with lint-typing
steps:
- uses: actions/checkout@v4
- name: Install Python
uses: actions/setup-python@v4
with:
python-version: "3.11"
- uses: snok/install-poetry@v1
- name: Install dependencies
run: poetry install ${{ matrix.deps }}
- run: poetry run ${{ matrix.command }}
# test:
# runs-on: ubuntu-latest
# steps:
# - uses: actions/checkout@v4
# - name: Install Python
# uses: actions/setup-python@v4
# with:
# python-version: "3.12"
# - uses: snok/install-poetry@v1
# - run: poetry run python -m pip install --upgrade pip setuptools
# - name: Install dependencies
# run: poetry install
# - run: poetry run pytest