2021-08-03 12:22:06 +00:00
|
|
|
name: Lint Moonstream backend
|
|
|
|
|
|
|
|
on:
|
2021-08-16 09:53:57 +00:00
|
|
|
pull_request:
|
|
|
|
branches:
|
|
|
|
- "main"
|
2021-08-03 12:22:06 +00:00
|
|
|
paths:
|
|
|
|
- "backend/**"
|
2022-05-03 18:45:34 +00:00
|
|
|
- "!backend/deploy/**"
|
2021-08-03 12:22:06 +00:00
|
|
|
|
|
|
|
jobs:
|
|
|
|
build:
|
|
|
|
runs-on: ubuntu-20.04
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v2
|
|
|
|
- name: Set up python
|
|
|
|
uses: actions/setup-python@v2
|
|
|
|
with:
|
|
|
|
python-version: "3.8"
|
2021-11-10 14:05:13 +00:00
|
|
|
- name: Upgrade pip and setuptools
|
|
|
|
run: pip install --upgrade pip setuptools
|
2021-08-03 12:22:06 +00:00
|
|
|
- name: Install test requirements
|
|
|
|
working-directory: ./backend
|
2021-11-10 14:49:13 +00:00
|
|
|
run: pip install -e .[dev]
|
2021-08-24 13:50:36 +00:00
|
|
|
- name: Mypy type check
|
|
|
|
working-directory: ./backend
|
2021-11-10 14:20:47 +00:00
|
|
|
run: mypy moonstreamapi/
|
2021-08-03 12:22:06 +00:00
|
|
|
- name: Black syntax check
|
|
|
|
working-directory: ./backend
|
2021-11-10 14:20:47 +00:00
|
|
|
run: black --check moonstreamapi/
|