Skip to content

Commit

Permalink
Update CI job with linting and deprecated command (#181)
Browse files Browse the repository at this point in the history
* Dont use deprecated command for installing the project

* Remove matrix for linting

* Remove linter requirements file

* Fix single quotes
  • Loading branch information
andrewgy8 authored Jan 13, 2025
1 parent 809f136 commit 15220a1
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 15 deletions.
14 changes: 4 additions & 10 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,19 +9,13 @@ on:
jobs:
lint:
runs-on: ubuntu-latest
strategy:
matrix:
lint-command:
- flake8 .
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: "3.x"
cache: 'pip'
cache-dependency-path: 'linter-requirements.txt'
- run: python -m pip install -r linter-requirements.txt
- run: ${{ matrix.lint-command }}
python-version: "3.13"
- run: python -m pip install flake8 flake8-quotes isort
- run: flake8 .

test:
needs:
Expand Down Expand Up @@ -52,7 +46,7 @@ jobs:
with:
python-version: ${{ matrix.python-version }}
- run: python -m pip install -U pip setuptools wheel
- run: python setup.py install
- run: python -m pip install .
- run: python -m pip install pytest pytest-cov pytest-django
- run: python -m pip install django~=${{ matrix.django-version }}.0
- run: python -m pytest
1 change: 0 additions & 1 deletion linter-requirements.txt

This file was deleted.

2 changes: 1 addition & 1 deletion setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ max-line-length = 120

[flake8]
ignore = E402,F403,F811
exclude = migrations
exclude = migrations,.venv,examples
max-complexity = 20
max-line-length = 120

Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ def rel(*xs):
"pytest-cov",
"pytest-django",
"twine",
]
],
},
python_requires=">=3.9",
include_package_data=True,
Expand Down
4 changes: 2 additions & 2 deletions tests/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -74,8 +74,8 @@ def path_to(*paths):
DATABASES = {
"default": {
"ENGINE": "django.db.backends.sqlite3",
'TEST': {
'NAME': 'testdb.sqlite3',
"TEST": {
"NAME": "testdb.sqlite3",
},
}
}
Expand Down

0 comments on commit 15220a1

Please sign in to comment.