Skip to content

Commit

Permalink
Merge pull request EGCETSII#32 from Penyagolosa-3/postproc-isamunval
Browse files Browse the repository at this point in the history
Postproc isamunval
  • Loading branch information
isamunval authored Jan 7, 2022
2 parents 661a640 + fee9850 commit d3702d8
Show file tree
Hide file tree
Showing 6 changed files with 533 additions and 68 deletions.
94 changes: 47 additions & 47 deletions .github/workflows/django.yml
Original file line number Diff line number Diff line change
@@ -1,48 +1,48 @@
name: Python application

on: [push]

jobs:
build:
runs-on: ubuntu-latest

strategy:
matrix:
pyversion: ['3.5','3.8']
services:
postgres:
image: postgres:10.8
env:
POSTGRES_USER: decide
POSTGRES_PASSWORD: decide
POSTGRES_DB: decide
ports:
- 5432:5432
# needed because the postgres container does not provide a healthcheck
options: --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5

steps:
- uses: actions/checkout@v1
- name: Set up Python ${{matrix.pyversion}}
uses: actions/setup-python@v1
with:
python-version: ${{matrix.pyversion}}
- name: psycopg2 prerequisites
run: sudo apt-get install libpq-dev
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
pip install codacy-coverage
- name: Run migrations
run: cd decide;python manage.py migrate
- name: Run tests postproc
run: cd decide;coverage run --branch --source=. ./manage.py test postproc --keepdb; coverage xml;
- name: Run tests visualizer
run: cd decide;coverage run --branch --source=. ./manage.py test visualizer --keepdb; coverage xml;
- name: Codacy Coverage Reporter
uses: codacy/[email protected]
with:
project-token: ${{ secrets.CODACY_PROJECT_TOKEN }}

name: Python application

on: [push]

jobs:
build:
runs-on: ubuntu-latest

strategy:
matrix:
pyversion: ['3.5','3.8']
services:
postgres:
image: postgres:10.8
env:
POSTGRES_USER: decide
POSTGRES_PASSWORD: decide
POSTGRES_DB: decide
ports:
- 5432:5432
# needed because the postgres container does not provide a healthcheck
options: --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5

steps:
- uses: actions/checkout@v1
- name: Set up Python ${{matrix.pyversion}}
uses: actions/setup-python@v1
with:
python-version: ${{matrix.pyversion}}
- name: psycopg2 prerequisites
run: sudo apt-get install libpq-dev
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
pip install codacy-coverage
- name: Run migrations
run: cd decide;python manage.py migrate
- name: Run tests postproc
run: cd decide;coverage run --branch --source=. ./manage.py test postproc --keepdb; coverage xml;
- name: Run tests visualizer
run: cd decide;coverage run --branch --source=. ./manage.py test visualizer --keepdb; coverage xml;
- name: Codacy Coverage Reporter
uses: codacy/[email protected]
with:
project-token: ${{ secrets.CODACY_PROJECT_TOKEN }}

coverage-reports: decide/coverage.xml
1 change: 0 additions & 1 deletion decide/authentication/urls.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,4 @@
path('getuser/', GetUserView.as_view()),
path('register/', RegisterView.as_view()),
path('signin/',TemplateView.as_view(template_name="login.html")),
path('accounts/',include('allauth.urls')),
]
30 changes: 12 additions & 18 deletions decide/decide/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,13 +43,6 @@
'gateway',


'allauth',
'allauth.account',
'allauth.socialaccount',
'allauth.socialaccount.providers.microsoft',
'allauth.socialaccount.providers.azure',
'allauth.socialaccount.providers.google',

]

REST_FRAMEWORK = {
Expand Down Expand Up @@ -199,20 +192,21 @@
vars()[k] = v



INSTALLED_APPS = INSTALLED_APPS + MODULES

AUTHENTICATION_BACKENDS = (
'django.contrib.auth.backends.ModelBackend',
'allauth.account.auth_backends.AuthenticationBackend'
)
#AUTHENTICATION_BACKENDS = (
# 'django.contrib.auth.backends.ModelBackend',
# 'allauth.account.auth_backends.AuthenticationBackend'
#)

SITE_ID = 2
#SITE_ID = 2

LOGIN_REDIRECT_URL = '/'
#LOGIN_REDIRECT_URL = '/'

NOSE_ARGS = [
'--with-xunit'
]
#NOSE_ARGS = [
#'--with-xunit'
#]

import django_heroku
django_heroku.settings(locals(),test_runner=False)
#import django_heroku
#django_heroku.settings(locals(),test_runner=False)
2 changes: 2 additions & 0 deletions decide/local_settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
'voting',
]


BASEURL = 'http://localhost:8000'

APIS = {
Expand Down Expand Up @@ -40,5 +41,6 @@

# number of bits for the key, all auths should use the same number of bits


KEYBITS = 256

Loading

0 comments on commit d3702d8

Please sign in to comment.