Skip to content

feat: Conclude Event tests #168

feat: Conclude Event tests

feat: Conclude Event tests #168

Workflow file for this run

name: Django CI
on:
push:
branches: [ "dev" ]
pull_request:
branches: [ "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.py
- 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 }}