Skip to content

Commit

Permalink
Merge pull request #4 from ARYAN-NIKNEZHAD/chore/pyproject.toml-config
Browse files Browse the repository at this point in the history
🔧  Update pyproject.toml config
  • Loading branch information
sepehr-akbarzadeh authored Aug 28, 2024
2 parents 5be840e + cb84fee commit d162746
Show file tree
Hide file tree
Showing 8 changed files with 539 additions and 1,564 deletions.
32 changes: 32 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: CI

on: [push, pull_request]

jobs:
test:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: '3.x'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install coverage codecov pytest
pip install -r packages/requirements-dev.txt
- name: Run tests
run: |
coverage run -m pytest
- name: Generate coverage report
run: coverage xml
- name: Run Tox tests
run: tox
- name: Run pre-commmit hooks
run: tox -e pre-commit
- name: Upload coverage to Codecov
run: codecov
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -169,3 +169,4 @@ manage.py
# Ignore all migrations files except __init__.py
**/migrations/*
!**/migrations/__init__.py
bandit_report.txt
15 changes: 14 additions & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,17 +9,30 @@ repos:
- id: check-added-large-files
- id: detect-private-key

- repo: https://github.com/pre-commit/mirrors-isort
rev: v5.10.1
hooks:
- id: isort
exclude: (migrations/|tests/|docs/|static/|media/).*

- repo: https://github.com/psf/black
rev: 23.3.0
hooks:
- id: black
language_version: python3.11
exclude: (migrations/|tests/|docs/|static/|media/).*

- repo: https://github.com/charliermarsh/ruff-pre-commit
rev: v0.5.5
hooks:
- id: ruff

- repo: https://github.com/PyCQA/bandit
rev: 1.7.4
hooks:
- id: bandit
args: ["-c pyproject.toml"]
additional_dependencies: ["toml"]

- repo: https://github.com/PyCQA/docformatter
rev: v1.7.5
hooks:
Expand Down
1,037 changes: 87 additions & 950 deletions packages/requirements-dev.txt

Large diffs are not rendered by default.

277 changes: 15 additions & 262 deletions packages/requirements.txt

Large diffs are not rendered by default.

Loading

0 comments on commit d162746

Please sign in to comment.