Skip to content

triggered by push from bsweger #23

triggered by push from bsweger

triggered by push from bsweger #23

name: run-code-checks
run-name: ${{ github.action }} triggered by ${{ github.event_name }} from ${{ github.actor }}
on:
push:
pull_request:
# to avoid duplicate workflow runs, don't run when PR is synchronized
# (which is the default) because it will run on the push
types: [opened, reopened, ready_for_review]
workflow_dispatch:
jobs:
run-checks:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up PDM
# using the PDM action because actions/setup-python doesn't suppport
# caching for PDM out of the box
# https://github.com/pdm-project/setup-pdm?tab=readme-ov-file#why-do-i-need-this-action
uses: pdm-project/setup-pdm@v4
with:
cache: true
- name: Install dependencies
run: |
echo "installing project dependencies"
pdm install
- name: lint
run: |
source .venv/bin/activate
ruff check
- name: type check
run: |
source .venv/bin/activate
mypy . --ignore-missing-imports