Skip to content

Commit

Permalink
fix: set default threshold to 0.05
Browse files Browse the repository at this point in the history
  • Loading branch information
simllll committed Feb 21, 2023
1 parent 96050ec commit 6c39fec
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ The possible inputs for this action are:
| `github-token` (**Required**) | Github token used for posting the comment. To use the key provided by the GitHub action runner, use `${{ secrets.GITHUB_TOKEN }}`. | |
| `monorepo-base-path` (**Required**) | The location of your monrepo `packages` path | |
| `s3-config` | Configuration for uploading lcov files to s3. Json Encoded. e.g. '{ credentials: { accessKeyId: "", secretAccessKey: "" }, region: "", Bucket: "repository-code-coverage" }' | |
| `threshold` | Sets the threshold before the action fails if coverage of a package decreases | 0.1% |
| `threshold` | Sets the threshold before the action fails if coverage of a package decreases | 0.05% |

## Examples

Expand Down
2 changes: 1 addition & 1 deletion action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ inputs:
description: 's3 config for lcov file storage, json encoded { credentials: { accessKeyId: "", secretAccessKey: "", }, region: "", Bucket: "repository-code-coverage" }'
required: false
threshold:
description: 'minimum threshold (in %) before the action fails, default is 0.1%'
description: 'minimum threshold (in %) before the action fails, default is 0.05%'
required: false
runs:
using: node16
Expand Down
2 changes: 1 addition & 1 deletion dist/index.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion src/app.ts
Original file line number Diff line number Diff line change
Expand Up @@ -243,7 +243,7 @@ export async function generateReport(
prNumber: number,
base: string,
mainBase = "master",
threshold = 0.1,
threshold = 0.05,
) {
const [{ lcovArrayForMonorepo }, { lcovBaseArrayForMonorepo }] =
await Promise.all([
Expand Down
2 changes: 1 addition & 1 deletion src/cli.ts
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ try {
const options = {
base: "base...",
folder: monorepoBasePath.split("/")[1],
threshold: 0.1,
threshold: 0.05,
};

// eslint-disable-next-line no-console
Expand Down

0 comments on commit 6c39fec

Please sign in to comment.