Skip to content

Commit

Permalink
gh actions, travis removed
Browse files Browse the repository at this point in the history
  • Loading branch information
peppelinux committed Apr 7, 2021
1 parent 275729e commit 5ed09bf
Show file tree
Hide file tree
Showing 5 changed files with 65 additions and 33 deletions.
4 changes: 3 additions & 1 deletion .coveragerc
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,9 @@
omit =
*/site-packages/*
*/distutils/*
tests/*
*tests/*
*/apps/*
*/migrations/*
*/src/*
manage.py
django_idp/*
55 changes: 55 additions & 0 deletions .github/workflows/python-app.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
# This workflow will install Python dependencies, run tests and lint with a single version of Python
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions

name: uniAuth

on:
push:
branches: [ master, dev ]
pull_request:
branches: [ master, dev ]

jobs:
build:

runs-on: ubuntu-latest

strategy:
fail-fast: false
matrix:
python-version:
- '3.7'
- '3.8'
- '3.9'
django-version:
- '3.1'
- '3.2'

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 system package
run: |
sudo apt-get update
sudo apt-get install libsasl2-dev python3-dev libldap2-dev libssl-dev xmlsec1
- name: Install dependencies
run: |
python -m pip install --upgrade pip
if [ -f requirements-dev.txt ]; then pip install -r requirements-dev.txt; fi
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
#- name: Lint with flake8
#run: |
# stop the build if there are Python syntax errors or undefined names
#flake8 ./src/cms --count --select=E9,F63,F7,F82 --show-source --statistics
# exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
#flake8 ./src/cms --count --exit-zero --statistics

- name: Test with Django tests
run: |
pytest --cov-config=.coveragerc --cov=. -v --ignore=tests/test_05_ldap_datastore.py
#- name: Bandit Security Scan
#run: |
#bandit -r -x test* uniauth/*
27 changes: 0 additions & 27 deletions .travis.yml

This file was deleted.

10 changes: 6 additions & 4 deletions requirements-dev.txt
Original file line number Diff line number Diff line change
@@ -1,13 +1,15 @@
# django saml2 idp
djangosaml2==0.40.1
djangosaml2>=1.0.0

pytest==5.4.1
pytest-django==3.8.0
pytest-pythonpath==0.7.3
python-dateutil==2.7.5
pytest-cov
pylama
codecov
pytest-cov==2.10.1

bandit
flake8
coverage

sphinx>=2
sphinx_rtd_theme
Expand Down
2 changes: 1 addition & 1 deletion tests/test_02_sp.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,4 +41,4 @@ def test_authn_request(self):

login_url = reverse('uniauth:saml_login_process')
assert response.status_code == 302 and \
response._headers['location'][1] == login_url
response.url == login_url

0 comments on commit 5ed09bf

Please sign in to comment.