-
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #44 from ARYAN-NIKNEZHAD/develop
Develop to Main
- Loading branch information
Showing
5 changed files
with
1,258 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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" ] |
Oops, something went wrong.