Django Coverage Test #139
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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." |