Skip to content

Group all list routes in a single route #202

Group all list routes in a single route

Group all list routes in a single route #202

Workflow file for this run

name: Django CI
on:
push:
branches: [ "stable", "dev" ]
pull_request:
branches: [ "stable", "dev" ]
jobs:
build:
runs-on: ubuntu-latest
strategy:
max-parallel: 4
matrix:
python-version: [3.9]
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v3
with:
python-version: ${{ matrix.python-version }}
- name: Install Dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
- name: Create settings_local.py
run: |
echo "SECRET_KEY = 'SECRET_KEY'" > CapX/settings_local.py
echo "DEBUG = True" >> CapX/settings_local.py
echo "ALLOWED_HOSTS = ['localhost', '127.0.0.1']" >> CapX/settings_local.py
echo "BASE_DIR = '${GITHUB_WORKSPACE}'" >> CapX/settings_local.py
echo "DATABASES = {'default': {'ENGINE': 'django.db.backends.sqlite3', 'NAME': 'db.sqlite3'}}" >> CapX/settings_local.py
echo "LANGUAGES = (('en', 'English'),('pt', 'Portuguese'),('es', 'Spanish'),)" >> CapX/settings_local.py
echo "SOCIAL_AUTH_MEDIAWIKI_CALLBACK = 'https://localhost:8000/oauth/complete/mediawiki/'" >> CapX/settings_local.py
echo "SOCIAL_AUTH_MEDIAWIKI_KEY = 'key'" >> CapX/settings_local.py
echo "SOCIAL_AUTH_MEDIAWIKI_URL = 'https://localhost:8000/w/api.php'" >> CapX/settings_local.py
echo "SOCIAL_AUTH_MEDIAWIKI_SECRET = 'text'" >> CapX/settings_local.py
echo "EMAIL_HOST = 'localhost'" >> CapX/settings_local.py
echo "EMAIL_PORT = 25" >> CapX/settings_local.py
echo "SERVER_EMAIL = 'root@localhost'" >> CapX/settings_local.py
echo "ADMINS = []" >> CapX/settings_local.py
echo " CapX/tests/test_settings_local.py" >> .coveragerc
- name: Coverage report
run: |
pip install coverage
coverage run manage.py test
coverage report
coverage xml
- name: SonarCloud Scan
uses: SonarSource/sonarcloud-github-action@master
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Needed to get PR information, if any
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}