Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 33 additions & 0 deletions .github/quality.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: Verify Code Quality & Security

on:
push:
branches: [ main ]
pull_request:
branches: [ main ]

concurrency:
group: ${{ github.workflow }}-${{ github.event_name == 'pull_request' && github.event.pull_request.number || github.ref_name }}
cancel-in-progress: true

jobs:
quality:
runs-on: ubuntu-latest
timeout-minutes: 30
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: '3.9'
- name: Install requirements
run: |
pip install ".[dev]"
- name: Install the pre-commit hooks
run: |
pre-commit install
- name: Validate all pre-commit verification were run correctly
run: |
pre-commit run --all-files
- name: Send failure message
if: failure() # This step will only run if a previous step failed
run: echo "The quality & security verification failed. This is likely due to not using pre-commit hooks please run 'pre-commit install' before any commit."
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ m = "cli.m:cli"
# Use these like:
# pip install -e .[dev]
# pip install mellea[dev]
dev = ["mypy", "mypy-extensions", "tomli", "codespell"]
dev = ["mypy", "mypy-extensions", "tomli", "codespell", "pre-commit"]
sphinx = ["sphinx_rtd_theme", "sphinx-autodoc-typehints", "sphinx_mdinclude"]

[dependency-groups]
Expand Down