32 lines
767 B
YAML
32 lines
767 B
YAML
name: Format and Lint Checks
|
|
on:
|
|
push:
|
|
branches:
|
|
- main
|
|
paths:
|
|
- '*.py'
|
|
pull_request:
|
|
types: [ assigned, opened, synchronize, reopened ]
|
|
jobs:
|
|
formatting-check:
|
|
name: Formatting Check
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v3
|
|
- uses: psf/black@stable
|
|
with:
|
|
jupyter: true
|
|
linting-check:
|
|
name: Linting Check
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v3
|
|
- uses: actions/setup-python@v4
|
|
with:
|
|
python-version: "3.10"
|
|
cache: 'pip'
|
|
- run: python -m pip install --upgrade pip
|
|
- run: python -m pip install .
|
|
- run: python -m pip install --upgrade flake8
|
|
- run: python -m flake8 . --exclude build/
|