From 26ae2941482c1ce4af8c7456285ec58f904af98d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?D=C3=ADdac=20Coll?= Date: Sat, 16 Oct 2021 19:49:59 +0200 Subject: [PATCH] Import coverage to codecov Add codecov project Remove travis project --- .github/workflows/main.yml | 12 ++++++++++-- .travis.yml | 18 ------------------ README.md | 2 +- codecov.yml | 6 ++++++ 4 files changed, 17 insertions(+), 21 deletions(-) delete mode 100644 .travis.yml create mode 100644 codecov.yml diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 5f33fcd..69d3907 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -20,6 +20,14 @@ jobs: uses: actions/setup-python@v2 with: python-version: 3.6 - - name: Test with pytest + - name: Install dependencies + run: pip install coverage + - name: Test unittest run: | - python -m unittest discover \ No newline at end of file + coverage run -m unittest discover + coverage xml + - name: "Upload coverage to Codecov" + uses: codecov/codecov-action@v2 + with: + fail_ci_if_error: true + token: ${{ secrets.CODECOV_TOKEN }} \ No newline at end of file diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 0f48d10..0000000 --- a/.travis.yml +++ /dev/null @@ -1,18 +0,0 @@ -language: python -python: - - "3.6" - - "3.7" - - "3.8" - - "pypy3" -branches: - except: - only: - - /.*/ - -install: - - pip install coverage - - pip install coveralls -script: - - coverage run -m unittest discover -after_success: - - coveralls diff --git a/README.md b/README.md index 047a3b4..c141dbc 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ # mdutils [![Build Status](https://travis-ci.org/didix21/mdutils.svg?branch=master)](https://travis-ci.org/didix21/mdutils) [![Documentation Status](https://readthedocs.org/projects/mdutils/badge/?version=latest)](http://mdutils.readthedocs.io/en/latest/?badge=latest) -[![Coverage Status](https://coveralls.io/repos/github/didix21/mdutils/badge.svg?branch=master)](https://coveralls.io/github/didix21/mdutils?branch=master) +[![codecov](https://codecov.io/gh/didix21/mdutils/branch/master/graph/badge.svg?token=0DN72Z1B6V)](https://codecov.io/gh/didix21/mdutils) Table of Contents ================= diff --git a/codecov.yml b/codecov.yml new file mode 100644 index 0000000..bb6b121 --- /dev/null +++ b/codecov.yml @@ -0,0 +1,6 @@ +coverage: + status: + project: + default: + target: 80% # the required coverage value + threshold: 1% \ No newline at end of file