-
Notifications
You must be signed in to change notification settings - Fork 0
37 lines (35 loc) · 1.17 KB
/
ci-python.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
name: Format, Lint and TypeCheck Python projects
on:
pull_request:
paths:
- python/**
concurrency:
group: ci-${{ github.workflow }}-${{ github.ref }}-python
cancel-in-progress: true
jobs:
format-lint-typecheck:
runs-on: ubuntu-latest
defaults:
run:
working-directory: python
steps:
- uses: actions/checkout@v4
- name: Install poetry
run: pipx install poetry
- uses: actions/setup-python@v5
with:
python-version: "3.10"
- name: Install dependencies
run: poetry install
- name: Run format check
run: poetry run invoke format --check
- name: Run lint
run: poetry run invoke lint
# TODO: Find a way to avoid the mysterious error below.
# `Pydantic plugin not installed, please add pydantic.mypy your mypy.ini plugins`
# - name: Run type check for starlette_mongodb
# run: poetry run mypy starlette_mongodb
- name: Run type check for starlette_strawberry_graphql
run: poetry run mypy starlette_strawberry_graphql
- name: Run type check for starlette_strawberry_subgraph
run: poetry run mypy starlette_strawberry_subgraph