Merge pull request #26 from Pennycook/schema #36
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Format with black and lint with Flake8 | |
on: | |
push: | |
branches: [ "main" ] | |
paths: | |
- 'p3/**' | |
pull_request: | |
branches: [ "main" ] | |
paths: | |
- 'p3/**' | |
jobs: | |
format: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: psf/black@stable | |
with: | |
options: "--check --verbose --diff --color" | |
src: "./p3" | |
version: "22.12.0" | |
lint: | |
runs-on: ubuntu-latest | |
needs: format | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-python@v3 | |
name: Install Python 3.9 | |
with: | |
python-version: "3.9" | |
- name: Install flake8 and plugins | |
run: | | |
pip install flake8 flake8-pyproject flake8-black flake8-bandit | |
- name: Run flake8 on the package only | |
run: | | |
flake8 ./p3 | |
permissions: read-all |