Skip to content

Commit

Permalink
Merge pull request #44 from ARYAN-NIKNEZHAD/develop
Browse files Browse the repository at this point in the history
Develop to Main
  • Loading branch information
ARYAN-NIKNEZHAD authored Aug 28, 2024
2 parents 7774375 + 6c2c341 commit 8f7012a
Show file tree
Hide file tree
Showing 5 changed files with 1,258 additions and 5 deletions.
44 changes: 44 additions & 0 deletions .github/workflow/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
name: CI

on: [push, pull_request]

jobs:
test:
runs-on: ubuntu-latest

strategy:
matrix:
python-version: [3.8, 3.9, 3.10, 3.11, 3.12]
django-version: [4.2, 5.0, 5.1]

steps:
- uses: actions/checkout@v2

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}

- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install poetry tox
poetry install
pip install coverage codecov pytest
- name: Run tests with coverage
run: coverage run -m pytest

- name: Generate coverage report
run: coverage xml

- name: Run Tox tests
run: tox

- name: Run pre-commit hooks
run: tox -e pre-commit

- name: Upload coverage to Codecov
run: codecov
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
46 changes: 46 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.4.0
hooks:
- id: trailing-whitespace
exclude: (tests/|docs/).*
- id: end-of-file-fixer
exclude: (tests/|docs/).*
- id: check-yaml
exclude: (tests/|docs/).*
- id: check-added-large-files
exclude: (tests/|docs/).*
- id: check-case-conflict
exclude: (tests/|docs/).*
- id: check-merge-conflict
exclude: (tests/|docs/).*
- id: check-docstring-first
exclude: (tests/|docs/).*


- repo: https://github.com/psf/black
rev: 24.4.2
hooks:
- id: black
exclude: (tests/|docs/).*


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


- repo: https://github.com/commitizen-tools/commitizen
rev: v3.28.0
hooks:
- id: commitizen
exclude: (tests/|docs/).*

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

0 comments on commit 8f7012a

Please sign in to comment.