Skip to content

Commit

Permalink
Merge #6150 from justinmk3/fixcodecov
Browse files Browse the repository at this point in the history
  • Loading branch information
justinmk3 authored Dec 4, 2024
2 parents d74f96c + a505edb commit ffd94b4
Show file tree
Hide file tree
Showing 2 changed files with 65 additions and 38 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/node.js.yml
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ jobs:
env:
# Unset NODE_OPTIONS because of https://github.com/codecov/uploader/issues/475
NODE_OPTIONS: ''
if: ${{ github.repository == 'aws/aws-toolkit-vscode' && github.ref == 'master' }}
if: ${{ github.repository == 'aws/aws-toolkit-vscode' && github.event_name == 'pull_request' && github.base_ref == 'master' }}
uses: codecov/codecov-action@v5
with:
flags: macos-toolkit-unittests
Expand All @@ -95,7 +95,7 @@ jobs:
env:
# Unset NODE_OPTIONS because of https://github.com/codecov/uploader/issues/475
NODE_OPTIONS: ''
if: ${{ github.repository == 'aws/aws-toolkit-vscode' && github.ref == 'master' }}
if: ${{ github.repository == 'aws/aws-toolkit-vscode' && github.event_name == 'pull_request' && github.base_ref == 'master' }}
uses: codecov/codecov-action@v5
with:
flags: macos-amazonq-unittests
Expand Down Expand Up @@ -154,7 +154,7 @@ jobs:
env:
# Unset NODE_OPTIONS because of https://github.com/codecov/uploader/issues/475
NODE_OPTIONS: ''
if: ${{ github.repository == 'aws/aws-toolkit-vscode' && github.ref == 'master' }}
if: ${{ github.repository == 'aws/aws-toolkit-vscode' && github.event_name == 'pull_request' && github.base_ref == 'master' }}
uses: codecov/codecov-action@v5
with:
flags: windows-unittests
Expand Down
97 changes: 62 additions & 35 deletions codecov.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,73 +5,98 @@ codecov:
notify:
require_ci_to_pass: no

ignore:
- 'node_modules/'
- 'plugins/'
- 'scripts/'
- 'src.gen/'

coverage:
precision: 2
round: down
range: '70...100'

status:
project:
# Note: `default` measures the entire project.
# It does NOT define defaults "inherited" by other `project` items.
# https://docs.codecov.com/docs/commit-status
all:
target: 80%
threshold: 5%
informational: true
default:
informational: true # Always pass. Ignore `target`, `threshold`, etc.
target: 80
threshold: 5
only_pulls: true
codewhisperer:
informational: true # Always pass. Ignore `target`, `threshold`, etc.
paths:
- packages/core/src/codewhisperer/*
- 'packages/core/src/codewhisperer/'
- 'packages/core/src/amazonq*/*'
- 'packages/amazonq/src/'
flags:
- 'codewhisperer'
target: 80%
threshold: 5%
informational: true
target: 80
threshold: 5
only_pulls: true
amazonqFeatureDev:
informational: true # Always pass. Ignore `target`, `threshold`, etc.
paths:
- packages/core/src/amazonqFeatureDev/*
- 'packages/core/src/amazonqFeatureDev/*'
flags:
- 'amazonqFeatureDev'
target: 80%
threshold: 5%
informational: true
target: 80
threshold: 5
only_pulls: true
amazonqGumby:
informational: true # Always pass. Ignore `target`, `threshold`, etc.
paths:
- packages/core/src/amazonqGumby/*
target: 80%
threshold: 5%
informational: true
- 'packages/core/src/amazonqGumby/*'
target: 80
threshold: 5
only_pulls: true
codewhispererChat:
informational: true # Always pass. Ignore `target`, `threshold`, etc.
paths:
- packages/core/src/codewhispererChat/*
target: 80%
threshold: 5%
informational: true
- 'packages/core/src/codewhispererChat/*'
target: 80
threshold: 5
only_pulls: true
applicationcomposer:
informational: true # Always pass. Ignore `target`, `threshold`, etc.
paths:
- packages/core/src/applicationcomposer/*
target: 80%
threshold: 5%
informational: true
- 'packages/core/src/applicationcomposer/*'
target: 80
threshold: 5
only_pulls: true
stepFunctions:
informational: true # Always pass. Ignore `target`, `threshold`, etc.
paths:
- packages/core/src/stepFunctions/*
target: 50%
threshold: 10%
informational: true
- 'packages/core/src/stepFunctions/*'
target: 50
threshold: 10
only_pulls: true
threatComposer:
informational: true # Always pass. Ignore `target`, `threshold`, etc.
paths:
- 'packages/core/src/threatComposer/*'
target: 80
threshold: 5
only_pulls: true
tests:
# Most code in test/ should always be "covered"!
target: 95
paths:
- packages/core/src/threatComposer/*
target: 80%
threshold: 5%
informational: true
- '**/test/**'
patch:
default:
# Note: `default` measures the entire project.
# It does NOT define defaults "inherited" by other `project` items.
# https://docs.codecov.com/docs/commit-status
target: 90
threshold: 5
only_pulls: true
patch: false
informational: false # Fail if PR changes are not covered.
# branches:
# - master
changes: false

comment: false
Expand All @@ -82,7 +107,9 @@ github_checks:
flags:
codewhisperer:
paths:
- packages/core/src/codewhisperer/
- 'packages/core/src/codewhisperer/'
- 'packages/core/src/amazonq*/*'
- 'packages/amazonq/src/'
amazonqFeatureDev:
paths:
- packages/core/src/amazonqFeatureDev/
- 'packages/core/src/amazonqFeatureDev/'

0 comments on commit ffd94b4

Please sign in to comment.