Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add coveralls badge #6

Merged
merged 1 commit into from
May 22, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 22 additions & 1 deletion .github/workflows/checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
on:
pull_request:
push:
branches: [ main, develop ]
branches: [ main ]

jobs:
test:
Expand Down Expand Up @@ -46,3 +46,24 @@ jobs:
inv ci.prepare
- name: Run checks ${{ matrix.python-version }}
run: inv git.run-hooks
- name: Upload results to coveralls
run: |
pip install coveralls
coveralls --service=github
env:
COVERALLS_REPO_TOKEN: ${{ secrets.COVERALLS_REPO_TOKEN }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
COVERALLS_FLAG_NAME: python ${{ matrix.python-version }} - django ${{ matrix.django-version }}
COVERALLS_PARALLEL: true

coveralls-finish:
needs: test
if: ${{ always() }}
runs-on: ubuntu-latest
steps:
- name: Coveralls Finished
run: |
pip install coveralls
coveralls --service=github --finish
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
6 changes: 5 additions & 1 deletion HISTORY.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,13 @@
History
=======

1.0.0 (2023-05-18)
------------------
* Release Beta version

0.1.3 (2023-05-15)
------------------
Migrate from ``setup.py`` and ``setup.cfg`` to ``pyproject.toml``
* Migrate from ``setup.py`` and ``setup.cfg`` to ``pyproject.toml``

0.1.2 (2023-05-12)
------------------
Expand Down
4 changes: 4 additions & 0 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@ django-import-export-extensions
:target: https://github.com/saritasa-nest/django-import-export-extensions/actions/workflows/checks.yml
:alt: Build status on Github

.. image:: https://coveralls.io/repos/github/saritasa-nest/django-import-export-extensions/badge.svg?branch=main
:target: https://coveralls.io/github/saritasa-nest/django-import-export-extensions?branch=main
:alt: Test coverage

.. image:: https://img.shields.io/badge/python%20versions-3.9%20%7C%203.10%20%7C%203.11-blue
:target: https://pypi.org/project/django-import-export-extensions/
:alt: Supported python versions
Expand Down
2 changes: 1 addition & 1 deletion import_export_extensions/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@

__author__ = """Saritasa"""
__email__ = "pypi@saritasa.com"
__version__ = "0.1.3"
__version__ = "1.0.0"
7 changes: 7 additions & 0 deletions provision/start.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,10 @@ def run_python(context, command: str, watchers=()):
" ".join(["python3", command]),
watchers=watchers,
)

def run_coverage(context, command: str, watchers=()):
"""Run command using coverage."""
return context.run(
" ".join(["coverage run", command]),
watchers=watchers,
)
7 changes: 6 additions & 1 deletion provision/tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,9 @@ def run(context, params=""):
@task
def run_ci(context):
"""Run tests in github actions."""
run(context, params="-v")
start.run_coverage(
context,
"--source import_export_extensions "
"--omit import_export_extensions/migrations "
"-m pytest -v",
)
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ authors = [
]
requires-python = ">=3.9"
classifiers = [
"Development Status :: 2 - Pre-Alpha",
"Development Status :: 4 - Beta",
"Intended Audience :: Developers",
"License :: OSI Approved :: MIT License",
"Natural Language :: English",
Expand Down
3 changes: 3 additions & 0 deletions requirements/development.txt
Original file line number Diff line number Diff line change
Expand Up @@ -69,3 +69,6 @@ Werkzeug

# Needed for documentation generation
watchdog

# Code coverage testing for Python.
coverage