Skip to content

Commit ffd94b4

Browse files
authored
Merge #6150 from justinmk3/fixcodecov
2 parents d74f96c + a505edb commit ffd94b4

File tree

2 files changed

+65
-38
lines changed

2 files changed

+65
-38
lines changed

.github/workflows/node.js.yml

+3-3
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ jobs:
8484
env:
8585
# Unset NODE_OPTIONS because of https://github.com/codecov/uploader/issues/475
8686
NODE_OPTIONS: ''
87-
if: ${{ github.repository == 'aws/aws-toolkit-vscode' && github.ref == 'master' }}
87+
if: ${{ github.repository == 'aws/aws-toolkit-vscode' && github.event_name == 'pull_request' && github.base_ref == 'master' }}
8888
uses: codecov/codecov-action@v5
8989
with:
9090
flags: macos-toolkit-unittests
@@ -95,7 +95,7 @@ jobs:
9595
env:
9696
# Unset NODE_OPTIONS because of https://github.com/codecov/uploader/issues/475
9797
NODE_OPTIONS: ''
98-
if: ${{ github.repository == 'aws/aws-toolkit-vscode' && github.ref == 'master' }}
98+
if: ${{ github.repository == 'aws/aws-toolkit-vscode' && github.event_name == 'pull_request' && github.base_ref == 'master' }}
9999
uses: codecov/codecov-action@v5
100100
with:
101101
flags: macos-amazonq-unittests
@@ -154,7 +154,7 @@ jobs:
154154
env:
155155
# Unset NODE_OPTIONS because of https://github.com/codecov/uploader/issues/475
156156
NODE_OPTIONS: ''
157-
if: ${{ github.repository == 'aws/aws-toolkit-vscode' && github.ref == 'master' }}
157+
if: ${{ github.repository == 'aws/aws-toolkit-vscode' && github.event_name == 'pull_request' && github.base_ref == 'master' }}
158158
uses: codecov/codecov-action@v5
159159
with:
160160
flags: windows-unittests

codecov.yml

+62-35
Original file line numberDiff line numberDiff line change
@@ -5,73 +5,98 @@ codecov:
55
notify:
66
require_ci_to_pass: no
77

8+
ignore:
9+
- 'node_modules/'
10+
- 'plugins/'
11+
- 'scripts/'
12+
- 'src.gen/'
13+
814
coverage:
915
precision: 2
1016
round: down
1117
range: '70...100'
1218

1319
status:
1420
project:
21+
# Note: `default` measures the entire project.
22+
# It does NOT define defaults "inherited" by other `project` items.
1523
# https://docs.codecov.com/docs/commit-status
16-
all:
17-
target: 80%
18-
threshold: 5%
19-
informational: true
24+
default:
25+
informational: true # Always pass. Ignore `target`, `threshold`, etc.
26+
target: 80
27+
threshold: 5
2028
only_pulls: true
2129
codewhisperer:
30+
informational: true # Always pass. Ignore `target`, `threshold`, etc.
2231
paths:
23-
- packages/core/src/codewhisperer/*
32+
- 'packages/core/src/codewhisperer/'
33+
- 'packages/core/src/amazonq*/*'
34+
- 'packages/amazonq/src/'
2435
flags:
2536
- 'codewhisperer'
26-
target: 80%
27-
threshold: 5%
28-
informational: true
37+
target: 80
38+
threshold: 5
2939
only_pulls: true
3040
amazonqFeatureDev:
41+
informational: true # Always pass. Ignore `target`, `threshold`, etc.
3142
paths:
32-
- packages/core/src/amazonqFeatureDev/*
43+
- 'packages/core/src/amazonqFeatureDev/*'
3344
flags:
3445
- 'amazonqFeatureDev'
35-
target: 80%
36-
threshold: 5%
37-
informational: true
46+
target: 80
47+
threshold: 5
3848
only_pulls: true
3949
amazonqGumby:
50+
informational: true # Always pass. Ignore `target`, `threshold`, etc.
4051
paths:
41-
- packages/core/src/amazonqGumby/*
42-
target: 80%
43-
threshold: 5%
44-
informational: true
52+
- 'packages/core/src/amazonqGumby/*'
53+
target: 80
54+
threshold: 5
4555
only_pulls: true
4656
codewhispererChat:
57+
informational: true # Always pass. Ignore `target`, `threshold`, etc.
4758
paths:
48-
- packages/core/src/codewhispererChat/*
49-
target: 80%
50-
threshold: 5%
51-
informational: true
59+
- 'packages/core/src/codewhispererChat/*'
60+
target: 80
61+
threshold: 5
5262
only_pulls: true
5363
applicationcomposer:
64+
informational: true # Always pass. Ignore `target`, `threshold`, etc.
5465
paths:
55-
- packages/core/src/applicationcomposer/*
56-
target: 80%
57-
threshold: 5%
58-
informational: true
66+
- 'packages/core/src/applicationcomposer/*'
67+
target: 80
68+
threshold: 5
5969
only_pulls: true
6070
stepFunctions:
71+
informational: true # Always pass. Ignore `target`, `threshold`, etc.
6172
paths:
62-
- packages/core/src/stepFunctions/*
63-
target: 50%
64-
threshold: 10%
65-
informational: true
73+
- 'packages/core/src/stepFunctions/*'
74+
target: 50
75+
threshold: 10
6676
only_pulls: true
6777
threatComposer:
78+
informational: true # Always pass. Ignore `target`, `threshold`, etc.
79+
paths:
80+
- 'packages/core/src/threatComposer/*'
81+
target: 80
82+
threshold: 5
83+
only_pulls: true
84+
tests:
85+
# Most code in test/ should always be "covered"!
86+
target: 95
6887
paths:
69-
- packages/core/src/threatComposer/*
70-
target: 80%
71-
threshold: 5%
72-
informational: true
88+
- '**/test/**'
89+
patch:
90+
default:
91+
# Note: `default` measures the entire project.
92+
# It does NOT define defaults "inherited" by other `project` items.
93+
# https://docs.codecov.com/docs/commit-status
94+
target: 90
95+
threshold: 5
7396
only_pulls: true
74-
patch: false
97+
informational: false # Fail if PR changes are not covered.
98+
# branches:
99+
# - master
75100
changes: false
76101

77102
comment: false
@@ -82,7 +107,9 @@ github_checks:
82107
flags:
83108
codewhisperer:
84109
paths:
85-
- packages/core/src/codewhisperer/
110+
- 'packages/core/src/codewhisperer/'
111+
- 'packages/core/src/amazonq*/*'
112+
- 'packages/amazonq/src/'
86113
amazonqFeatureDev:
87114
paths:
88-
- packages/core/src/amazonqFeatureDev/
115+
- 'packages/core/src/amazonqFeatureDev/'

0 commit comments

Comments
 (0)