Skip to content

Commit 44dbec7

Browse files
authored
added version support with some basic changes (#6)
1 parent 241f8c8 commit 44dbec7

File tree

8 files changed

+384
-5
lines changed

8 files changed

+384
-5
lines changed
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
name: Check Python Code Formatting and Lint
2+
3+
on:
4+
pull_request:
5+
branches:
6+
- main
7+
paths:
8+
- '**/*.py'
9+
10+
jobs:
11+
lint-and-format:
12+
runs-on: ubuntu-latest
13+
14+
steps:
15+
- name: Checkout code
16+
uses: actions/checkout@v3
17+
18+
- name: Set up Python
19+
uses: actions/setup-python@v4
20+
with:
21+
python-version: '3.12'
22+
23+
- name: Install Poetry
24+
run: curl -sSL https://install.python-poetry.org | python3 -
25+
26+
- name: Install dependencies
27+
run: |
28+
poetry config virtualenvs.create false
29+
poetry install --with dev
30+
31+
- name: Install Pre-commit hooks
32+
run: |
33+
poetry run pre-commit install
34+
35+
- name: Run pre-commit checks
36+
run: |
37+
poetry run pre-commit run --all-files
38+
continue-on-error: false

.github/workflows/run-tests.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,4 +33,4 @@ jobs:
3333
# Step 5: Run all test cases with coverage check
3434
- name: Run Tests with Coverage Threshold
3535
run: |
36-
poetry run pytest --cov=tests/ --cov-fail-under=90
36+
poetry run pytest --cov=type_fastapi --cov-fail-under=90 --cov-report=term-missing

.pre-commit-config.yaml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
repos:
2+
- repo: https://github.com/psf/black
3+
rev: 23.9.1
4+
hooks:
5+
- id: black
6+
language_version: python3.12
7+
files: \.py$
8+
args: ['--line-length', '88']
9+
10+
- repo: https://github.com/pycqa/flake8
11+
rev: 6.1.0
12+
hooks:
13+
- id: flake8
14+
language_version: python3.12
15+
files: \.py$
16+
args: ['--max-line-length', '88']

poetry.lock

Lines changed: 213 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pyproject.toml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[tool.poetry]
22
name = "type-fastapi"
3-
version = "0.1.6"
3+
version = "0.1.7"
44
description = ""
55
authors = ["KevinRawal <[email protected]>"]
66
readme = "README.md"
@@ -17,6 +17,8 @@ pytest = "^8.3.3"
1717
[tool.poetry.group.dev.dependencies]
1818
pytest-cov = "^6.0.0"
1919
black = "^24.10.0"
20+
pre-commit = "^4.0.1"
21+
flake8 = "^7.1.1"
2022

2123
[build-system]
2224
requires = ["poetry-core"]

0 commit comments

Comments
 (0)