Add codecov coverage

This commit is contained in:
David Wobrock committed 2021-06-06 16:44:20 +02:00
1 parent d8b899248a
commit a119b4ba1f
6 files changed
+57

No files matched your search

+4
View File
@@ -0,0 +1,4 @@
coverage:
status:
project: off
patch: off
+42
View File
@@ -62,3 +62,45 @@ jobs:
run: tox run: tox
env: env:
TOXENV: lint TOXENV: lint
coverage:
name: Generate coverage
runs-on: ubuntu-latest
services:
postgres:
image: postgres
env:
POSTGRES_PASSWORD: postgres
ports:
- 5432:5432
options: --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5
mysql:
image: mysql:5.7
env:
MYSQL_ALLOW_EMPTY_PASSWORD: yes
ports:
- 3306:3306
options: --health-cmd="mysqladmin ping" --health-interval=10s --health-timeout=5s --health-retries=3
steps:
- name: Checkout code
uses: actions/checkout@v2
# Fetch all tags and branches because tests rely on it
with:
fetch-depth: 0
- name: Set up Python 3.7
uses: actions/setup-python@v2
with:
python-version: 3.7
- name: Install dependencies and coverage
run: python -m pip install tox
- name: Test with tox with coverage
run: tox
env:
TOXENV: coverage
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v1
with:
token: ${{ secrets.CODECOV_TOKEN }}
file: ./coverage.xml
+1
View File
@@ -6,6 +6,7 @@
Miscellaneous: Miscellaneous:
* Add complete and working support for `toml` configuration files * Add complete and working support for `toml` configuration files
* Add code coverage to the linter
* Renamed `master` branch to `main` * Renamed `master` branch to `main`
## 2.5.3 ## 2.5.3
+1
View File
@@ -4,6 +4,7 @@ Detect backward incompatible migrations for your Django project.
It will save you time by making sure migrations will not break with a older codebase. It will save you time by making sure migrations will not break with a older codebase.
[![Build Status](https://img.shields.io/endpoint.svg?url=https%3A%2F%2Factions-badge.atrox.dev%2F3YOURMIND%2Fdjango-migration-linter%2Fbadge%3Fref%3Dmain&style=flat)](https://actions-badge.atrox.dev/3YOURMIND/django-migration-linter/goto?ref=main) [![Build Status](https://img.shields.io/endpoint.svg?url=https%3A%2F%2Factions-badge.atrox.dev%2F3YOURMIND%2Fdjango-migration-linter%2Fbadge%3Fref%3Dmain&style=flat)](https://actions-badge.atrox.dev/3YOURMIND/django-migration-linter/goto?ref=main)
[![codecov](https://codecov.io/gh/3YOURMIND/django-migration-linter/branch/master/graph/badge.svg?token=pgNNXGbCf7)](https://codecov.io/gh/3YOURMIND/django-migration-linter)
[![PyPI](https://img.shields.io/pypi/v/django-migration-linter.svg)](https://pypi.python.org/pypi/django-migration-linter/) [![PyPI](https://img.shields.io/pypi/v/django-migration-linter.svg)](https://pypi.python.org/pypi/django-migration-linter/)
[![PR_Welcome](https://img.shields.io/badge/PR-welcome-green.svg)](https://github.com/3YOURMIND/django-migration-linter/pulls) [![PR_Welcome](https://img.shields.io/badge/PR-welcome-green.svg)](https://github.com/3YOURMIND/django-migration-linter/pulls)
[![3YD_Hiring](https://img.shields.io/badge/3YOURMIND-Hiring-brightgreen.svg)](https://www.3yourmind.com/career) [![3YD_Hiring](https://img.shields.io/badge/3YOURMIND-Hiring-brightgreen.svg)](https://www.3yourmind.com/career)
+1
View File
@@ -46,6 +46,7 @@ setup(
"django_add_default_value>=0.4.0", "django_add_default_value>=0.4.0",
'mock>=3.0.5;python_version<"3.3"', 'mock>=3.0.5;python_version<"3.3"',
'backports.tempfile>=1.0;python_version<="2.7"', 'backports.tempfile>=1.0;python_version<="2.7"',
"coverage>=5.5",
], ],
}, },
keywords="django migration lint linter database backward compatibility", keywords="django migration lint linter database backward compatibility",
+8
View File
@@ -5,6 +5,7 @@ envlist =
py{35,36,37,38,39}-django22 py{35,36,37,38,39}-django22
py{36,37,38,39}-django{30,31,32} py{36,37,38,39}-django{30,31,32}
lint lint
coverage
[gh-actions] [gh-actions]
python = python =
@@ -38,3 +39,10 @@ commands =
flake8 django_migration_linter/ flake8 django_migration_linter/
black --check django_migration_linter/ tests/ manage.py setup.py black --check django_migration_linter/ tests/ manage.py setup.py
isort --check-only . isort --check-only .
[testenv:coverage]
commands =
coverage run manage.py test --no-input {posargs}
coverage xml -i
extras = test
pip_pre = true