From 3daa1f5aa64dad71f164a9e54b8dcaed9ec8e1af Mon Sep 17 00:00:00 2001 From: Stefan Kairinos Date: Wed, 17 Apr 2024 16:52:33 +0100 Subject: [PATCH] Polish test (#102) * add upload to code cov * add secret input * fail ci if error * force xml coverage report * update settings * delete fail check * Merge branch 'main' into polish_test --- .github/workflows/test-python-code.yaml | 6 +++++- .submodules/configs.jsonc | 25 +++++++++++++++---------- 2 files changed, 20 insertions(+), 11 deletions(-) diff --git a/.github/workflows/test-python-code.yaml b/.github/workflows/test-python-code.yaml index 58eac715..900ed3be 100644 --- a/.github/workflows/test-python-code.yaml +++ b/.github/workflows/test-python-code.yaml @@ -37,6 +37,9 @@ on: type: string required: false default: "./codecov.yml" + secrets: + CODECOV_TOKEN: + required: true jobs: test-py-code: @@ -102,8 +105,9 @@ jobs: - name: ๐Ÿงช Test Code Units working-directory: ${{ inputs.working-directory }} - run: pipenv run pytest -n=auto -c=${{ env.PYPROJECT_TOML }} ${{ inputs.source-path }} + run: pipenv run pytest -n=auto --cov --cov-report=xml -c=${{ env.PYPROJECT_TOML }} ${{ inputs.source-path }} + # TODO: check if target is asserted - name: ๐Ÿ“ˆ Upload Coverage Reports to Codecov uses: codecov/codecov-action@v4 with: diff --git a/.submodules/configs.jsonc b/.submodules/configs.jsonc index 83af2352..a625c3ed 100644 --- a/.submodules/configs.jsonc +++ b/.submodules/configs.jsonc @@ -31,7 +31,10 @@ "davidanson.vscode-markdownlint", "bierner.markdown-mermaid", "streetsidesoftware.code-spell-checker", - "tamasfe.even-better-toml" + "tamasfe.even-better-toml", + "github.vscode-github-actions", + "codecov.codecov", + "ritwickdey.liveserver" ] } } @@ -170,41 +173,43 @@ "**/.mypy_cache": true, "**/.hypothesis": true }, - "isort.path": [ + "!isort.path": [ ".venv/bin/python", "-m", "isort" ], - "isort.args": [ + "!isort.args": [ "--settings-file=pyproject.toml" ], - "black-formatter.path": [ + "!black-formatter.path": [ ".venv/bin/python", "-m", "black" ], - "black-formatter.args": [ + "!black-formatter.args": [ "--config", "pyproject.toml" ], - "mypy-type-checker.path": [ + "!mypy-type-checker.path": [ ".venv/bin/python", "-m", "mypy" ], - "mypy-type-checker.args": [ + "!mypy-type-checker.args": [ "--config-file=pyproject.toml" ], - "pylint.path": [ + "!pylint.path": [ ".venv/bin/python", "-m", "pylint" ], - "pylint.args": [ + "!pylint.args": [ "--rcfile=pyproject.toml" ], - "python.testing.pytestArgs": [ + "!python.testing.pytestArgs": [ "-n=auto", + "--cov", + "--cov-report=html", "-c=pyproject.toml", "." ]