Skip to content

Django Coverage Test #139

Django Coverage Test

Django Coverage Test #139

name: Django Coverage Test
on:
workflow_run:
workflows: ["Running Tests"]
types:
- completed
branches:
- '*'
workflow_dispatch:
jobs:
test:
name: Test with Coverage
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Set up Python environment
uses: actions/setup-python@v2
with:
python-version: '3.x'
- name: Install dependencies
run: |
cd ./Django/communicado
python -m pip install --upgrade pip
pip install -r requirements.txt
pip install coverage
- name: Make Migrations
run: |
cd ./Django/communicado
python manage.py makemigrations
python manage.py migrate || true
- name: Run Coverage Test
run: |
cd ./Django/communicado
coverage run manage.py test
coverage report
coverage html -d coverage_report
- name: Print End Status
run: |
echo "Coverage tests completed."