forked from snok/django-auth-adfs
-
Notifications
You must be signed in to change notification settings - Fork 0
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 snok#131 from snok/ci
Removes travis and updates supported Django versions
- Loading branch information
Showing
11 changed files
with
132 additions
and
419 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,43 @@ | ||
name: coverage | ||
|
||
on: | ||
pull_request: | ||
push: | ||
branches: | ||
- master | ||
|
||
jobs: | ||
codecov: | ||
# --------------------------------------------------- | ||
# Documentation and examples can be found at | ||
# https://github.com/snok/install-poetry | ||
# --------------------------------------------------- | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: actions/setup-python@v2 | ||
with: | ||
python-version: 3.9 | ||
- name: Install poetry | ||
uses: snok/install-poetry@v1.1.1 | ||
with: | ||
virtualenvs-create: true | ||
virtualenvs-in-project: true | ||
- name: Load cached venv | ||
id: cached-poetry-dependencies | ||
uses: actions/cache@v2 | ||
with: | ||
path: .venv | ||
key: venv-${{ runner.os }}-${{ hashFiles('**/poetry.lock') }} | ||
- name: Install dependencies | ||
run: poetry install | ||
if: steps.cached-poetry-dependencies.outputs.cache-hit != 'true' | ||
- name: Test with pytest | ||
run: | | ||
poetry run coverage run manage.py test -v 2 | ||
poetry run coverage xml | ||
- name: Upload coverage | ||
uses: codecov/codecov-action@v1 | ||
with: | ||
file: ./coverage.xml | ||
fail_ci_if_error: true |
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,72 @@ | ||
name: test | ||
|
||
on: pull_request | ||
|
||
jobs: | ||
linting: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: actions/setup-python@v2 | ||
with: | ||
python-version: "3" | ||
- uses: actions/cache@v2 | ||
with: | ||
path: ~/.cache/pip | ||
key: ${{ runner.os }}-pip | ||
restore-keys: | | ||
${{ runner.os }}-pip- | ||
${{ runner.os }}- | ||
- run: python -m pip install flake8 # isort black | ||
- run: | | ||
flake8 . | ||
# black . --check | ||
# isort . | ||
test: | ||
# --------------------------------------------------- | ||
# Documentation and examples can be found at | ||
# https://github.com/snok/install-poetry | ||
# --------------------------------------------------- | ||
needs: linting | ||
runs-on: ubuntu-latest | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
python-version: [ "3.6", "3.7", "3.8", "3.9"] | ||
django-version: [ "2.2", "3.0", "3.1" ] | ||
drf-version: [ "3.10", "3.11", "3.12" ] | ||
steps: | ||
- name: Check out repository | ||
uses: actions/checkout@v2 | ||
- name: Set up python ${{ matrix.python-version }} | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
- name: Install poetry | ||
uses: snok/install-poetry@v1.0.0 | ||
with: | ||
virtualenvs-create: true | ||
virtualenvs-in-project: true | ||
- name: Load cached venv | ||
id: cached-poetry-dependencies | ||
uses: actions/cache@v2 | ||
with: | ||
path: .venv | ||
key: venv-${{ runner.os }}-${{ hashFiles('**/poetry.lock') }} | ||
- name: Install dependencies | ||
run: poetry install | ||
if: steps.cached-poetry-dependencies.outputs.cache-hit != 'true' | ||
- name: Install django ${{ matrix.django-version }} | ||
run: | | ||
source .venv/bin/activate | ||
poetry add "Django==${{ matrix.django-version }}" | ||
- name: Install DRF | ||
run: | | ||
source .venv/bin/activate | ||
poetry add "djangorestframework==${{ matrix.drf-version }}" | ||
- run: pip install pyjwt==1.7.1 | ||
- name: Run tests | ||
run: | | ||
source .venv/bin/activate | ||
poetry run coverage run manage.py test -v 2 | ||
poetry run coverage report -m |
This file was deleted.
Oops, something went wrong.
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 |
---|---|---|
|
@@ -3,4 +3,3 @@ class MFARequired(Exception): | |
Exception to indicate that a MFA auth is required. | ||
""" | ||
pass | ||
|
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
Oops, something went wrong.