Skip to content

Commit

Permalink
add lint, tests, and type checks + github action
Browse files Browse the repository at this point in the history
  • Loading branch information
CalebCourier committed Feb 7, 2024
1 parent e89f861 commit 120aae5
Show file tree
Hide file tree
Showing 4 changed files with 51 additions and 4 deletions.
19 changes: 19 additions & 0 deletions .github/workflows/pr_qc.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
name: Pull Request Quality Checks
on:
pull_request:
types: [ opened, synchronize ]
branches: [ main ]
jobs:
run-qa:
runs-on: ubuntu-latest
steps:
- name: Check out repository code
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: 3.11
- name: Run qa
run: |
pip install ".[dev]"
make qa
13 changes: 13 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
lint:
ruff check .

tests:
pytest ./test

type:
pyright validator

qa:
make lint
make type
make tests
23 changes: 19 additions & 4 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,22 @@ readme = "README.md"
requires-python = ">= 3.8"
dependencies = [
"rstr",
"guardrails-ai>=0.3.2",
"pydantic>=2.4.2",
"pytest"
]
"guardrails-ai>=0.3.2"
]

[project.optional-dependencies]
dev = [
"pyright",
"pytest",
"ruff"
]

[tool.pytest.ini_options]
minversion = "6.0"
addopts = "-rP"
testpaths = [
"test"
]

[tool.pyright]
include = ["validator"]
File renamed without changes.

0 comments on commit 120aae5

Please sign in to comment.