From cea865059d6215a081e7ceae0c8304424b004d38 Mon Sep 17 00:00:00 2001 From: Matthew Peveler Date: Sun, 19 Sep 2021 15:50:00 -1000 Subject: Add code coverage tracking to CI --- .github/workflows/test.yml | 16 ++++++++-------- .gitignore | 1 + README.md | 3 ++- 3 files changed, 11 insertions(+), 9 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index a3d3930..4018e07 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -1,10 +1,6 @@ name: Test -on: - push: - branches: [ '*' ] - pull_request: - branches: [ '*' ] +on: ['push', 'pull_request'] jobs: lint: @@ -64,10 +60,12 @@ jobs: texlive-latex-base \ xsltproc - - run: pip install -U pytest + - run: pip install -U pytest coverage + + - run: coverage run -m asciidoc.asciidoc --doctest + - run: coverage run --append --source=asciidoc -m pytest + - run: coverage xml - - run: python -m asciidoc.asciidoc --doctest - - run: python -m pytest - run: time python tests/testasciidoc.py run - run: git clean -x -f doc tests/data @@ -83,6 +81,8 @@ jobs: - run: asciidoc --version - run: asciidoc --filter list + - uses: codecov/codecov-action@v2 + test-windows: needs: lint runs-on: windows-latest diff --git a/.gitignore b/.gitignore index d93022a..79d42f8 100644 --- a/.gitignore +++ b/.gitignore @@ -30,5 +30,6 @@ dist/ # test artifacts .coverage +coverage.xml htmlcov/ .pytest_cache/ diff --git a/README.md b/README.md index 1186cc8..a7d1ec0 100644 --- a/README.md +++ b/README.md @@ -2,6 +2,7 @@ AsciiDoc.py =========== [![Build Status](https://github.com/asciidoc/asciidoc-py3/workflows/Test/badge.svg?branch=master)](https://github.com/asciidoc/asciidoc-py3/actions?query=workflow%3ATest+branch%3Amaster) +[![codecov](https://codecov.io/gh/asciidoc-py/asciidoc-py/branch/main/graph/badge.svg?token=fNh3QlLTw0)](https://codecov.io/gh/asciidoc-py/asciidoc-py) __This branch is tracking the alpha, in-progress 10.x release. For the stable 9.x code, please go to the [9.x branch](https://github.com/asciidoc/asciidoc-py3/tree/9.x)!__ @@ -51,7 +52,7 @@ Current AsciiDoc.py version tested on Ubuntu 18.04 with: ## Copying -Copyright (C) 2002-2013 Stuart Rackham. +Copyright (C) 2002-2013 Stuart Rackham. Copyright (C) 2013-2021 AsciiDoc.py Contributors. Free use of this software is granted under the terms of the GNU General -- cgit v1.2.1