From 07049130d85f4406242653279b90de5427f7708f Mon Sep 17 00:00:00 2001 From: Mitchell Young Date: Mon, 19 Jul 2021 16:33:29 -0700 Subject: [PATCH 1/5] Add cov to envlist --- .github/workflows/unittests.yaml | 2 +- tox.ini | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/unittests.yaml b/.github/workflows/unittests.yaml index 2307030f16..fe7dc5f563 100644 --- a/.github/workflows/unittests.yaml +++ b/.github/workflows/unittests.yaml @@ -22,4 +22,4 @@ jobs: run: pip install tox - name: Run Tox # Run tox using the version of Python in `PATH` - run: tox -e py + run: tox -e py,cov diff --git a/tox.ini b/tox.ini index 7ebb1f7ef1..9d664b6109 100644 --- a/tox.ini +++ b/tox.ini @@ -1,5 +1,5 @@ [tox] -envlist = py36,py37,lint,cov +envlist = py37,lint,cov # need pip at least with --prefer-binary requires = pip >= 20.2 @@ -11,6 +11,7 @@ deps= -r{toxinidir}/requirements-testing.txt setenv = PYTHONPATH = {toxinidir} + USERNAME = armi commands = pytest --ignore=armi/utils/tests/test_gridGui.py {posargs} armi From faceee8b2c6398bb0d4a4e6f1694206e7d5cbd20 Mon Sep 17 00:00:00 2001 From: Mitchell Young Date: Mon, 19 Jul 2021 17:10:59 -0700 Subject: [PATCH 2/5] Add report --- .github/workflows/unittests.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/unittests.yaml b/.github/workflows/unittests.yaml index fe7dc5f563..4a105ab40c 100644 --- a/.github/workflows/unittests.yaml +++ b/.github/workflows/unittests.yaml @@ -22,4 +22,4 @@ jobs: run: pip install tox - name: Run Tox # Run tox using the version of Python in `PATH` - run: tox -e py,cov + run: tox -e py,cov,report From f5574cf553e34b331418bf75102092cd7bb61ba6 Mon Sep 17 00:00:00 2001 From: Mitchell Young Date: Tue, 20 Jul 2021 08:41:03 -0700 Subject: [PATCH 3/5] Add GITHUB_TOKEN and split coverage/report out --- .github/workflows/coverage.yaml | 26 ++++++++++++++++++++++++++ .github/workflows/unittests.yaml | 2 +- 2 files changed, 27 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/coverage.yaml diff --git a/.github/workflows/coverage.yaml b/.github/workflows/coverage.yaml new file mode 100644 index 0000000000..f5c2f65049 --- /dev/null +++ b/.github/workflows/coverage.yaml @@ -0,0 +1,26 @@ +name: Coverage + +on: [push, pull_request] + +jobs: + build: + + runs-on: ubuntu-20.04 + + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + + steps: + - uses: actions/checkout@v2 + - name: Setup Python + uses: actions/setup-python@v2 + with: + python-version: 3.9 + - name: Install mpi libs + run: sudo apt-get -y install libopenmpi-dev + - name: Install Tox and any other packages + run: pip install tox + - name: Run Tox + # Run tox using the version of Python in `PATH` + run: tox -e py,cov,report + diff --git a/.github/workflows/unittests.yaml b/.github/workflows/unittests.yaml index 4a105ab40c..2307030f16 100644 --- a/.github/workflows/unittests.yaml +++ b/.github/workflows/unittests.yaml @@ -22,4 +22,4 @@ jobs: run: pip install tox - name: Run Tox # Run tox using the version of Python in `PATH` - run: tox -e py,cov,report + run: tox -e py From a17b7ed22dbaa397a96fe8fb35a6d03cdeaed7c4 Mon Sep 17 00:00:00 2001 From: Mitchell Young Date: Tue, 20 Jul 2021 09:28:52 -0700 Subject: [PATCH 4/5] Add --service=github --- tox.ini | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tox.ini b/tox.ini index 9d664b6109..a27aca5103 100644 --- a/tox.ini +++ b/tox.ini @@ -34,7 +34,7 @@ deps= commands = coverage report coverage html - coveralls + coveralls --service=github depends = cov passenv = TOXENV CI GITHUB_* From ca2eed23e631e141b9fc4494f1f48bcfe01c944b Mon Sep 17 00:00:00 2001 From: Mitchell Young Date: Tue, 20 Jul 2021 10:07:02 -0700 Subject: [PATCH 5/5] Remove `py` from coverate envlist --- .github/workflows/coverage.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/coverage.yaml b/.github/workflows/coverage.yaml index f5c2f65049..a1220dc54e 100644 --- a/.github/workflows/coverage.yaml +++ b/.github/workflows/coverage.yaml @@ -22,5 +22,5 @@ jobs: run: pip install tox - name: Run Tox # Run tox using the version of Python in `PATH` - run: tox -e py,cov,report + run: tox -e cov,report