-
Notifications
You must be signed in to change notification settings - Fork 115
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
2717082
commit a411d87
Showing
4 changed files
with
99 additions
and
3 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,67 @@ | ||
name: Checks | ||
|
||
on: [push] | ||
|
||
jobs: | ||
flake8: | ||
name: flake8 | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
- name: Set up Python | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: 3.12 | ||
- name: Install flake8 | ||
run: pip install --upgrade flake8 | ||
- name: Run flake8 | ||
uses: liskin/gh-problem-matcher-wrap@v1 | ||
with: | ||
linters: flake8 | ||
run: flake8 | ||
|
||
isort: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
- name: Set up Python | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: 3.12 | ||
- run: python -m pip install isort | ||
- name: isort | ||
uses: liskin/gh-problem-matcher-wrap@v1 | ||
with: | ||
linters: isort | ||
run: isort -c --df aldryn_sso | ||
|
||
unit-tests: | ||
runs-on: ubuntu-latest | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"] | ||
django-version: ["3.2", "4.2", "5"] | ||
exclude: | ||
- python-version: "3.8" | ||
requirements: "dj50" | ||
- python-version: "3.9" | ||
requirements: "dj50" | ||
steps: | ||
- uses: actions/checkout@v1 | ||
- 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 django==${{ matrix.django-version }} | ||
pip install -r tests/requirements.txt | ||
python setup.py install | ||
- name: Run coverage | ||
run: coverage run setup.py test | ||
- name: Upload Coverage to Codecov | ||
uses: codecov/codecov-action@v1 |
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
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,28 @@ | ||
[flake8] | ||
max-line-length = 119 | ||
exclude = | ||
*.egg-info, | ||
.eggs, | ||
.git, | ||
.settings, | ||
.tox, | ||
build, | ||
data, | ||
dist, | ||
docs, | ||
*migrations*, | ||
requirements, | ||
tmp | ||
|
||
[isort] | ||
line_length = 119 | ||
skip = manage.py, *migrations*, .tox, .eggs, data | ||
include_trailing_comma = true | ||
multi_line_output = 5 | ||
not_skip = __init__.py | ||
lines_after_imports = 2 | ||
default_section = THIRDPARTY | ||
sections = FUTURE, STDLIB, DJANGO, CMS, THIRDPARTY, FIRSTPARTY, LIB, LOCALFOLDER | ||
known_first_party = aldryn_sso | ||
known_cms = cms, menus | ||
known_django = django |
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 |
---|---|---|
@@ -1,3 +1,4 @@ | ||
tox | ||
coverage | ||
flake8 | ||
packaging |