Add codecov coverage
This commit is contained in:
1 parent
d8b899248a
commit
a119b4ba1f
6 files changed
+57
No files matched your search
@@ -0,0 +1,4 @@
|
|||||||
|
coverage:
|
||||||
|
status:
|
||||||
|
project: off
|
||||||
|
patch: off
|
||||||
@@ -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
|
||||||
@@ -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
|
||||||
|
|||||||
@@ -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.
|
||||||
|
|
||||||
[](https://actions-badge.atrox.dev/3YOURMIND/django-migration-linter/goto?ref=main)
|
[](https://actions-badge.atrox.dev/3YOURMIND/django-migration-linter/goto?ref=main)
|
||||||
|
[](https://codecov.io/gh/3YOURMIND/django-migration-linter)
|
||||||
[](https://pypi.python.org/pypi/django-migration-linter/)
|
[](https://pypi.python.org/pypi/django-migration-linter/)
|
||||||
[](https://github.com/3YOURMIND/django-migration-linter/pulls)
|
[](https://github.com/3YOURMIND/django-migration-linter/pulls)
|
||||||
[](https://www.3yourmind.com/career)
|
[](https://www.3yourmind.com/career)
|
||||||
|
|||||||
@@ -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",
|
||||||
|
|||||||
@@ -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
|
||||||
Reference in new issue
Block a user