From 50fca3a107911db33ea52e8da71ede5701fd9287 Mon Sep 17 00:00:00 2001 From: Harry Date: Mon, 11 Sep 2023 14:26:02 +0100 Subject: [PATCH 1/7] Added `coveralls` action --- .github/workflows/coveralls.yml | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 .github/workflows/coveralls.yml diff --git a/.github/workflows/coveralls.yml b/.github/workflows/coveralls.yml new file mode 100644 index 000000000..652fb2dc4 --- /dev/null +++ b/.github/workflows/coveralls.yml @@ -0,0 +1,24 @@ +--- +on: push + +name: Coveralls + +jobs: + test: + runs-on: ubuntu-latest + steps: + + - uses: actions/checkout@v3 + + - name: Use Node.js 16.x + uses: actions/setup-node@v3 + with: + node-version: 16.x + + - name: npm install, make test-coverage + run: | + npm install + make test-coverage + + - name: Report Coveralls + uses: coverallsapp/github-action@v2 From c71e939357812342dddf6ff1ac23cb7918c83a9d Mon Sep 17 00:00:00 2001 From: Harry Date: Mon, 11 Sep 2023 15:18:54 +0100 Subject: [PATCH 2/7] Updated `coveralls` orb --> `2.2.1` --- .circleci/config.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 3be50071c..1ff943c57 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -5,7 +5,7 @@ version: 2.1 # See: https://circleci.com/docs/2.0/orb-intro/ orbs: - coveralls: coveralls/coveralls@1.0.6 + coveralls: coveralls/coveralls@2.2.1 jobs: build-and-test: @@ -40,7 +40,7 @@ jobs: path: /tmp/test-results/coverage.lcov destination: coverage - coveralls/upload: - path_to_lcov: /tmp/test-results/coverage.lcov + coverage_file: /tmp/test-results/coverage.lcov workflows: tests: From 191cb24130f219ff3b5ab7506917243f73219219 Mon Sep 17 00:00:00 2001 From: Harry Date: Mon, 11 Sep 2023 15:19:05 +0100 Subject: [PATCH 3/7] Removed `coveralls` action --- .github/workflows/coveralls.yml | 24 ------------------------ 1 file changed, 24 deletions(-) delete mode 100644 .github/workflows/coveralls.yml diff --git a/.github/workflows/coveralls.yml b/.github/workflows/coveralls.yml deleted file mode 100644 index 652fb2dc4..000000000 --- a/.github/workflows/coveralls.yml +++ /dev/null @@ -1,24 +0,0 @@ ---- -on: push - -name: Coveralls - -jobs: - test: - runs-on: ubuntu-latest - steps: - - - uses: actions/checkout@v3 - - - name: Use Node.js 16.x - uses: actions/setup-node@v3 - with: - node-version: 16.x - - - name: npm install, make test-coverage - run: | - npm install - make test-coverage - - - name: Report Coveralls - uses: coverallsapp/github-action@v2 From 8f5deec8ca32b9505942a44fa2af176d4f3b56f2 Mon Sep 17 00:00:00 2001 From: Harry Date: Mon, 11 Sep 2023 16:15:23 +0100 Subject: [PATCH 4/7] Updated python image version --> `3.11.5` --- .circleci/config.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 1ff943c57..b5f8ffd36 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -11,7 +11,7 @@ jobs: build-and-test: # Change the version below to your required version of python docker: - - image: cimg/python:3.10.9-node + - image: cimg/python:3.11.5-node user: root steps: - checkout From 2c6483684e45d33a39c7188470cfe6c264e47e9d Mon Sep 17 00:00:00 2001 From: Harry Date: Mon, 11 Sep 2023 18:01:28 +0100 Subject: [PATCH 5/7] Use `CodeCov` for code coverage reports --- .github/workflows/tests.yml | 2 ++ tox.ini | 4 ++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index afcebbef2..95a253472 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -25,3 +25,5 @@ jobs: uses: collective/tox-action@main with: python-version: ${{ matrix.python-version }} + - name: Upload coverage report to CodeCov ☂ + uses: codecov/codecov-action@v3 diff --git a/tox.ini b/tox.ini index 99e64abc0..400805b2d 100644 --- a/tox.ini +++ b/tox.ini @@ -15,13 +15,13 @@ skip_install = true setenv = PYTHONPATH = {toxinidir} deps = -r{toxinidir}/requirements/requirements_dev.txt commands = - pytest --basetemp={envtmpdir} + pytest --basetemp={envtmpdir} --cov-report=xml:coverage.xml [testenv:minerva-311] basepython = python3.11 deps = -r{toxinidir}/requirements/requirements_dev.txt commands = - pytest --basetemp={envtmpdir} + pytest --basetemp={envtmpdir} --cov-report=xml:coverage.xml mypy minerva flake8 minerva tests From 8b3b54647ba9ec7f1f888748590c81fb3abe18fd Mon Sep 17 00:00:00 2001 From: Harry Date: Mon, 11 Sep 2023 18:03:11 +0100 Subject: [PATCH 6/7] Use `CODECOV_TOKEN` --- .github/workflows/tests.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 95a253472..203f4e466 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -27,3 +27,5 @@ jobs: python-version: ${{ matrix.python-version }} - name: Upload coverage report to CodeCov ☂ uses: codecov/codecov-action@v3 + env: + CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} From 97ee4629e31058d6102a9d5092e50cdc6003a780 Mon Sep 17 00:00:00 2001 From: Harry Date: Tue, 12 Sep 2023 12:18:03 +0100 Subject: [PATCH 7/7] Added `codecov` badge to README --- README.md | 1 + docs/docs_readme.md | 1 + 2 files changed, 2 insertions(+) diff --git a/README.md b/README.md index 962db34de..581d6eb82 100644 --- a/README.md +++ b/README.md @@ -13,6 +13,7 @@ [![Coverage Status](https://coveralls.io/repos/github/Pale-Blue-Dot-97/Minerva/badge.svg?t=ZycdOW)](https://coveralls.io/github/Pale-Blue-Dot-97/Minerva) [![security: bandit](https://img.shields.io/badge/security-bandit-yellow.svg)](https://github.com/PyCQA/bandit) [![pre-commit.ci status](https://results.pre-commit.ci/badge/github/Pale-Blue-Dot-97/Minerva/main.svg)](https://results.pre-commit.ci/latest/github/Pale-Blue-Dot-97/Minerva/main) +[![codecov](https://codecov.io/gh/Pale-Blue-Dot-97/Minerva/graph/badge.svg?token=8TUR8A8XZ5)](https://codecov.io/gh/Pale-Blue-Dot-97/Minerva)
diff --git a/docs/docs_readme.md b/docs/docs_readme.md index 962db34de..581d6eb82 100644 --- a/docs/docs_readme.md +++ b/docs/docs_readme.md @@ -13,6 +13,7 @@ [![Coverage Status](https://coveralls.io/repos/github/Pale-Blue-Dot-97/Minerva/badge.svg?t=ZycdOW)](https://coveralls.io/github/Pale-Blue-Dot-97/Minerva) [![security: bandit](https://img.shields.io/badge/security-bandit-yellow.svg)](https://github.com/PyCQA/bandit) [![pre-commit.ci status](https://results.pre-commit.ci/badge/github/Pale-Blue-Dot-97/Minerva/main.svg)](https://results.pre-commit.ci/latest/github/Pale-Blue-Dot-97/Minerva/main) +[![codecov](https://codecov.io/gh/Pale-Blue-Dot-97/Minerva/graph/badge.svg?token=8TUR8A8XZ5)](https://codecov.io/gh/Pale-Blue-Dot-97/Minerva)