Merge pull request #286 from UniversityRadioYork/marks/python-ci

Add MyPy to CI
This commit is contained in:
Matthew Stratford 2023-04-12 22:59:44 +01:00 committed by GitHub
commit 209880a780
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -6,9 +6,9 @@ name: Checks
# events but only for the master branch # events but only for the master branch
on: on:
push: push:
branches: [ master ] branches: [master]
pull_request: pull_request:
branches: [ master ] branches: [master]
# A workflow run is made up of one or more jobs that can run sequentially or in parallel # A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs: jobs:
@ -47,3 +47,18 @@ jobs:
# Prettier # Prettier
- name: Prettier - name: Prettier
run: node_modules/.bin/prettier -c 'src/**/*.{js,ts,tsx,css,scss}' run: node_modules/.bin/prettier -c 'src/**/*.{js,ts,tsx,css,scss}'
python:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Install Poetry
run: pipx install poetry
- uses: actions/setup-python@v4
with:
python-version: "3.10"
cache: poetry
- run: poetry install --with=dev
- name: MyPy checks
run: poetry run mypy *.py