Skip to content

Commit ae3078c

Browse files
authored
FIX: set CODECOV_TOKEN (#487)
* DX: include workflows in VS Code search * DX: set target coverage to 33% * MAINT: clean up codecov configuration
1 parent 7ca4f88 commit ae3078c

File tree

5 files changed

+9
-18
lines changed

5 files changed

+9
-18
lines changed

.github/workflows/ci.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,8 @@ jobs:
3838
coverage-target: compwa_policy
3939
macos-python-version: "3.9"
4040
specific-pip-packages: ${{ inputs.specific-pip-packages }}
41+
secrets:
42+
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
4143
style:
4244
if: inputs.specific-pip-packages == ''
4345
secrets:

.vscode/settings.json

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -36,12 +36,6 @@
3636
"coverage-gutters.showLineCoverage": true,
3737
"diffEditor.experimental.showMoves": true,
3838
"editor.formatOnSave": true,
39-
"files.watcherExclude": {
40-
"**/*_cache/**": true,
41-
"**/.eggs/**": true,
42-
"**/.git/**": true,
43-
"**/.tox/**": true
44-
},
4539
"git.rebaseWhenSync": true,
4640
"github-actions.workflows.pinned.workflows": [".github/workflows/ci.yml"],
4741
"gitlens.telemetry.enabled": false,
@@ -67,8 +61,6 @@
6761
"search.exclude": {
6862
"**/tests/**/__init__.py": true,
6963
"**/uv.lock": true,
70-
".github/workflows/cd.yml": true,
71-
".github/workflows/ci.yml": true,
7264
".taplo.toml": true,
7365
"src/compwa_policy/.github/workflows/clean-caches.yml": true,
7466
"src/compwa_policy/.github/workflows/pr-linting.yml": true,

codecov.yml

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -9,25 +9,18 @@ coverage:
99
status:
1010
project:
1111
default:
12-
# basic
13-
target: 0% # can't go below this percentage
14-
threshold: 1% # allow drops by this percentage
12+
target: 33%
13+
threshold: 1%
1514
base: auto
16-
# advanced
17-
branches: null
1815
if_no_uploads: error
1916
if_not_found: success
2017
if_ci_failed: error
2118
only_pulls: false
22-
flags: null
23-
paths: null
2419
patch:
2520
default:
26-
# basic
2721
target: 0
2822
threshold: 5%
2923
base: auto
30-
# advanced
3124
branches: null
3225
if_no_uploads: error
3326
if_not_found: success

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -311,7 +311,7 @@ commands = [
311311
[
312312
"pytest",
313313
"{posargs}",
314-
"--cov-fail-under=30",
314+
"--cov-fail-under=33",
315315
"--cov-report=html",
316316
"--cov-report=xml",
317317
"--cov=compwa_policy",

src/compwa_policy/check_dev_files/github_workflows.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -259,6 +259,10 @@ def __update_pytest_section(
259259
with_section["additional-extras"] = " ".join(test_extras)
260260
if CONFIG_PATH.codecov.exists():
261261
with_section["coverage-target"] = __get_package_name()
262+
secrets = {
263+
"CODECOV_TOKEN": "${{ secrets.CODECOV_TOKEN }}",
264+
}
265+
config["jobs"]["pytest"]["secrets"] = secrets
262266
if not no_macos:
263267
with_section["macos-python-version"] = DoubleQuotedScalarString("3.9")
264268
if skip_tests:

0 commit comments

Comments
 (0)