Skip to content

Commit

Permalink
Polish test (#102)
Browse files Browse the repository at this point in the history
* 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
  • Loading branch information
SKairinos authored Apr 17, 2024
1 parent 27f119f commit 3daa1f5
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 11 deletions.
6 changes: 5 additions & 1 deletion .github/workflows/test-python-code.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,9 @@ on:
type: string
required: false
default: "./codecov.yml"
secrets:
CODECOV_TOKEN:
required: true

jobs:
test-py-code:
Expand Down Expand Up @@ -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:
Expand Down
25 changes: 15 additions & 10 deletions .submodules/configs.jsonc
Original file line number Diff line number Diff line change
Expand Up @@ -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"
]
}
}
Expand Down Expand Up @@ -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",
"."
]
Expand Down

0 comments on commit 3daa1f5

Please sign in to comment.