53 lines
1.2 KiB
YAML
53 lines
1.2 KiB
YAML
name: PR Lint and Test
|
|
|
|
on:
|
|
pull_request:
|
|
branches:
|
|
- develop
|
|
- master
|
|
|
|
jobs:
|
|
lint:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Checkout Repository
|
|
uses: actions/checkout@v3
|
|
- name: Set up Python and Cache Pip Dependencies
|
|
uses: actions/setup-python@v4
|
|
with:
|
|
python-version: '3.9'
|
|
cache: 'pip'
|
|
- name: Install Dependencies
|
|
run: pip install -r requirements.txt
|
|
- name: Run Black
|
|
run: |
|
|
python -m black --check .
|
|
- name: Run isort
|
|
run: |
|
|
python -m isort --check .
|
|
- name: Run Flake8
|
|
run: |
|
|
python -m flake8
|
|
- name: Run Pylint
|
|
run: |
|
|
python -m pylint app
|
|
- name: Run mypy
|
|
run: |
|
|
python -m mypy .
|
|
|
|
test:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Checkout Repository
|
|
uses: actions/checkout@v3
|
|
- name: Set up Python and Cache Pip Dependencies
|
|
uses: actions/setup-python@v4
|
|
with:
|
|
python-version: '3.9'
|
|
cache: 'pip'
|
|
- name: Install Dependencies
|
|
run: pip install -r requirements.txt
|
|
- name: Run Tests
|
|
run: |
|
|
python -m pytest
|