Skip to content

Commit

Permalink
Add formatting CI
Browse files Browse the repository at this point in the history
  • Loading branch information
sarlinpe committed Feb 19, 2024
1 parent e63f4c9 commit 7c12885
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 0 deletions.
25 changes: 25 additions & 0 deletions .github/workflows/code-quality.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: Format and Lint Checks
on:
push:
branches:
- master
paths:
- '*.py'
- '*.ipynb'
pull_request:
types: [ assigned, opened, synchronize, reopened ]
jobs:
check:
name: Format and Lint Checks
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 -r requirements/dev.txt
- run: python -m flake8 maploc
- run: python -m isort maploc *.ipynb --check-only --diff
- run: python -m black maploc *.ipynb --check --diff
3 changes: 3 additions & 0 deletions requirements/dev.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
black[jupyter]==24.2.0
isort
flake8

0 comments on commit 7c12885

Please sign in to comment.