From baaef53688f48dbd448499b53074e8814c2007ce Mon Sep 17 00:00:00 2001 From: Giulio Eulisse <10544+ktf@users.noreply.github.com> Date: Tue, 17 Oct 2023 15:20:52 +0200 Subject: [PATCH] Attempts to publish coverage invo --- .github/workflows/pr-check.yml | 2 +- tests/test_foo.py | 6 ++++++ tox.ini | 4 ++-- 3 files changed, 9 insertions(+), 3 deletions(-) create mode 100644 tests/test_foo.py diff --git a/.github/workflows/pr-check.yml b/.github/workflows/pr-check.yml index a6d7c582..79ef5bbe 100644 --- a/.github/workflows/pr-check.yml +++ b/.github/workflows/pr-check.yml @@ -96,7 +96,7 @@ jobs: # Apparently, patching os.readlink in unit tests interferes with # finding some source files, but our source shouldn't be affected, so # ignore these errors. - coverage json --ignore-errors -o coverage.json + coverage json -o coverage.json - name: Upload coverage information if: ${{ always() && github.event.repository.owner.login == 'alisw' }} diff --git a/tests/test_foo.py b/tests/test_foo.py new file mode 100644 index 00000000..b91d81ba --- /dev/null +++ b/tests/test_foo.py @@ -0,0 +1,6 @@ +import unittest + +class FooTest(unittest.TestCase): + def test_foo(self): + self.assertTrue(True) + diff --git a/tox.ini b/tox.ini index ed710071..4a3b1a5a 100644 --- a/tox.ini +++ b/tox.ini @@ -76,8 +76,6 @@ commands = coverage run --source={toxinidir} -a {toxinidir}/aliBuild version - coverage run --source={toxinidir} -a -m unittest discover {toxinidir}/tests - git clone -b O2-v1.3.0 --depth 1 https://github.com/alisw/alidist coverage run --source={toxinidir} -a {toxinidir}/aliBuild -a {env:ARCHITECTURE} -z test-init init zlib @@ -108,6 +106,8 @@ commands = coverage run --source={toxinidir} -a {toxinidir}/aliBuild init zlib touch zlib/foo coverage run --source={toxinidir} -a {toxinidir}/aliBuild -a {env:ARCHITECTURE} --no-system --disable GCC-Toolchain build zlib + coverage run --source={toxinidir} -a -m unittest discover {toxinidir}/tests + coverage run --source={envsitepackagesdir}/alibuild -a -m unittest discover {toxinidir}/tests [coverage:run] branch = True