.github/workflows/coverage.yml
name: Coverage
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
jobs:
build:
name: Coverage
runs-on: ubuntu-latest
services:
database:
image: postgres
env:
POSTGRES_USER: postgres
POSTGRES_DB: postgres
POSTGRES_PASSWORD: postgres
ports:
- 5432:5432
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
with:
python-version: '3.9'
- run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
pip install -e .
pip install coverage
coverage run --source=src/ tests/manage.py test
coverage report --skip-empty --skip-covered -m
coverage xml
- name: "Codecov"
uses: codecov/codecov-action@v2
with:
token: ${{ secrets.CODECOV_TOKEN }}
- name: CodeClimate
uses: paambaati/codeclimate-action@v3.2.0
env:
CC_TEST_REPORTER_ID: ${{ secrets.CC_TEST_REPORTER_ID }}