Compare commits

..

146 Commits

Author SHA1 Message Date
Tom Hu
a1ed4b322b Merge pull request #299 from codecov/pull-in-bash
Pull in bash script and bump to 1.5.0
2021-05-03 09:49:38 -04:00
Tom Hu
2332a737fb Update CHANGELOG 2021-04-29 17:44:11 -04:00
Tom Hu
dc56cf479e revert 2021-04-29 17:39:19 -04:00
Tom Hu
a5399823bb Ensure the right script 2021-04-29 17:36:42 -04:00
Tom Hu
9f471fc6f8 Pull in bash script 2021-04-29 17:33:25 -04:00
Tom Hu
062fb177ae Merge pull request #298 from codecov/dependabot/add-v2-config-file
Upgrade to GitHub-native Dependabot
2021-04-29 17:29:41 -04:00
Tom Hu
31d2c8f775 Merge pull request #278 from codecov/dependabot/npm_and_yarn/typescript-eslint/parser-4.22.0
Bump @typescript-eslint/parser from 4.20.0 to 4.22.0
2021-04-29 17:04:08 -04:00
dependabot-preview[bot]
47ed2776b9 Bump @typescript-eslint/parser from 4.20.0 to 4.22.0
Bumps [@typescript-eslint/parser](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/parser) from 4.20.0 to 4.22.0.
- [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases)
- [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/parser/CHANGELOG.md)
- [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v4.22.0/packages/parser)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2021-04-29 21:03:30 +00:00
Tom Hu
b37e21182f Update .github/dependabot.yml 2021-04-29 17:03:07 -04:00
Tom Hu
fd42ae77ab Merge pull request #293 from codecov/dependabot/npm_and_yarn/eslint-7.25.0
Bump eslint from 7.21.0 to 7.25.0
2021-04-29 17:01:51 -04:00
Tom Hu
998cb33cad Merge pull request #292 from codecov/dependabot/npm_and_yarn/ts-jest-26.5.5
Bump ts-jest from 26.5.3 to 26.5.5
2021-04-29 17:01:38 -04:00
dependabot-preview[bot]
052dc5d29d Bump eslint from 7.21.0 to 7.25.0
Bumps [eslint](https://github.com/eslint/eslint) from 7.21.0 to 7.25.0.
- [Release notes](https://github.com/eslint/eslint/releases)
- [Changelog](https://github.com/eslint/eslint/blob/master/CHANGELOG.md)
- [Commits](https://github.com/eslint/eslint/compare/v7.21.0...v7.25.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2021-04-29 21:00:27 +00:00
dependabot-preview[bot]
3e2901753e Bump ts-jest from 26.5.3 to 26.5.5
Bumps [ts-jest](https://github.com/kulshekhar/ts-jest) from 26.5.3 to 26.5.5.
- [Release notes](https://github.com/kulshekhar/ts-jest/releases)
- [Changelog](https://github.com/kulshekhar/ts-jest/blob/master/CHANGELOG.md)
- [Commits](https://github.com/kulshekhar/ts-jest/compare/v26.5.3...v26.5.5)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2021-04-29 21:00:03 +00:00
Tom Hu
6b52f2a1d9 Merge pull request #297 from codecov/dependabot/npm_and_yarn/types/jest-26.0.23
Bump @types/jest from 26.0.20 to 26.0.23
2021-04-29 16:59:47 -04:00
Tom Hu
4789835c72 Merge pull request #279 from codecov/dependabot/npm_and_yarn/actions/core-1.2.7
Bump @actions/core from 1.2.6 to 1.2.7
2021-04-29 16:59:25 -04:00
Tom Hu
47b1f9735f Merge pull request #277 from codecov/dependabot/npm_and_yarn/typescript-eslint/eslint-plugin-4.22.0
Bump @typescript-eslint/eslint-plugin from 4.16.1 to 4.22.0
2021-04-29 16:58:51 -04:00
Tom Hu
298ba60aef Merge pull request #271 from codecov/dependabot/npm_and_yarn/typescript-4.2.4
Bump typescript from 4.2.3 to 4.2.4
2021-04-29 16:58:22 -04:00
dependabot-preview[bot]
abf28f2040 Upgrade to GitHub-native Dependabot 2021-04-28 22:28:48 +00:00
dependabot-preview[bot]
cdc2a0ed57 Bump @types/jest from 26.0.20 to 26.0.23
Bumps [@types/jest](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/jest) from 26.0.20 to 26.0.23.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/jest)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2021-04-28 06:58:50 +00:00
Tom Hu
967e2b38a8 Merge pull request #287 from codecov/update-validation-regex
Update validation regex, pull checksums into script, and bump to 1.4.1
2021-04-20 08:59:13 -04:00
Tom Hu
77a7b61cd5 Lint 2021-04-20 08:38:33 -04:00
Tom Hu
50895b2a6f Pull checksums into script 2021-04-20 08:35:56 -04:00
Tom Hu
95e6f30a60 Update validation regex and bump to 1.4.1 2021-04-19 21:23:35 -04:00
Tom Hu
0e28ff86a5 Merge pull request #284 from codecov/1.4.0
Bump to 1.4.0
2021-04-16 12:54:26 -04:00
Tom Hu
72182f9425 Bump to 1.4.0 2021-04-16 11:23:33 -04:00
Tom Hu
ce1ffb8db7 Merge pull request #282 from codecov/add-checksum-verification
Add checksum verification of bash script
2021-04-16 11:21:04 -04:00
Tom Hu
864620acb9 Use i not 1 2021-04-16 07:58:51 -04:00
Tom Hu
6ac8172373 copypasta 2021-04-15 22:30:15 -04:00
Tom Hu
5ab0dbc584 alpha 2021-04-15 22:28:38 -04:00
Tom Hu
5e8c27dd4d tab 2021-04-15 22:26:06 -04:00
Tom Hu
444b352d52 Update tests 2021-04-15 22:25:03 -04:00
Tom Hu
83cbbf806b Add another test 2021-04-15 22:10:41 -04:00
Tom Hu
040839f579 Add validation of checksums 2021-04-15 22:08:27 -04:00
Tom Hu
6e56f7a5a6 Test version pulling 2021-04-15 11:25:10 -04:00
dependabot-preview[bot]
ae04cc96c3 Bump @actions/core from 1.2.6 to 1.2.7
Bumps [@actions/core](https://github.com/actions/toolkit/tree/HEAD/packages/core) from 1.2.6 to 1.2.7.
- [Release notes](https://github.com/actions/toolkit/releases)
- [Changelog](https://github.com/actions/toolkit/blob/main/packages/core/RELEASES.md)
- [Commits](https://github.com/actions/toolkit/commits/HEAD/packages/core)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2021-04-14 07:07:49 +00:00
dependabot-preview[bot]
d2569b4d35 Bump @typescript-eslint/eslint-plugin from 4.16.1 to 4.22.0
Bumps [@typescript-eslint/eslint-plugin](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/eslint-plugin) from 4.16.1 to 4.22.0.
- [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases)
- [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/CHANGELOG.md)
- [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v4.22.0/packages/eslint-plugin)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2021-04-13 06:35:27 +00:00
dependabot-preview[bot]
216c5372a9 Bump typescript from 4.2.3 to 4.2.4
Bumps [typescript](https://github.com/Microsoft/TypeScript) from 4.2.3 to 4.2.4.
- [Release notes](https://github.com/Microsoft/TypeScript/releases)
- [Commits](https://github.com/Microsoft/TypeScript/commits)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2021-04-08 07:03:28 +00:00
Tom Hu
9b0b9bbe2c Merge pull request #265 from codecov/dependabot/npm_and_yarn/typescript-eslint/parser-4.20.0
Bump @typescript-eslint/parser from 4.16.1 to 4.20.0
2021-04-02 15:07:48 -04:00
Tom Hu
1ee0196081 Merge pull request #264 from codecov/1.3.2
Overwrite pull_request_target pr number
2021-04-02 15:07:05 -04:00
Eli Hooten
c6a36d2dbb Merge pull request #263 from codecov/dependabot/npm_and_yarn/y18n-4.0.1
[Security] Bump y18n from 4.0.0 to 4.0.1
2021-04-01 09:24:23 -05:00
dependabot-preview[bot]
aaf0ccb935 Bump @typescript-eslint/parser from 4.16.1 to 4.20.0
Bumps [@typescript-eslint/parser](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/parser) from 4.16.1 to 4.20.0.
- [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases)
- [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/parser/CHANGELOG.md)
- [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v4.20.0/packages/parser)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2021-03-30 06:38:32 +00:00
Tom Hu
d9a1bbc2da Overwrite pull_request_target pr number 2021-03-29 18:11:53 -04:00
dependabot-preview[bot]
18017b2a95 [Security] Bump y18n from 4.0.0 to 4.0.1
Bumps [y18n](https://github.com/yargs/y18n) from 4.0.0 to 4.0.1. **This update includes a security fix.**
- [Release notes](https://github.com/yargs/y18n/releases)
- [Changelog](https://github.com/yargs/y18n/blob/master/CHANGELOG.md)
- [Commits](https://github.com/yargs/y18n/commits)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2021-03-29 18:40:26 +00:00
Tom Hu
fcebab03f2 Merge pull request #253 from codecov/1.3.1
Add network_filter to manifest
2021-03-16 11:43:28 -04:00
Tom Hu
7ea3ba9ac0 Add network_filter to manifest 2021-03-16 11:39:24 -04:00
Tom Hu
6ed0d16b40 Merge pull request #252 from codecov/1.3.0
Add network filter parameter
2021-03-16 09:30:08 -04:00
Tom Hu
79a0ba12c8 Add network filter parameter 2021-03-16 09:18:54 -04:00
Tom Hu
1f8f3abccc Merge pull request #247 from codecov/1.2.2
Bump to 1.2.2
2021-03-09 10:48:33 -05:00
Tom Hu
763298c6f6 Update CHANGELOG.md 2021-03-09 10:14:45 -05:00
Tom Hu
3207ad4e60 Merge pull request #241 from jeffkenney/fix-root-dir-arg
pass root_dir using proper bash arg
2021-03-09 10:14:26 -05:00
Tom Hu
ab3cfafc5b Bump to 1.2.2 2021-03-09 10:11:33 -05:00
Tom Hu
b708b7e81f Merge pull request #244 from codecov/override-fetch-depth
Overwrite the commit on pull_request* events
2021-03-09 10:06:18 -05:00
Tom Hu
65f43cece2 actually 2021-03-08 19:30:10 -05:00
Tom Hu
21a1e2948d Actually update tests 2021-03-08 19:25:23 -05:00
Tom Hu
227f879cd0 Fix test 2021-03-08 19:21:55 -05:00
Tom Hu
87fff2e891 payload 2021-03-08 19:18:47 -05:00
Tom Hu
50212c96c8 Dont need event 2021-03-08 19:14:20 -05:00
Tom Hu
e77dab65bf Do commit SHA edit for pull_request* 2021-03-08 19:11:29 -05:00
Tom Hu
ddfe212d72 output context 2021-03-08 19:03:49 -05:00
Tom Hu
71a6279758 Fix tests 2021-03-08 18:46:53 -05:00
Tom Hu
6a50e6841d Add actions/github 2021-03-08 18:43:48 -05:00
Tom Hu
482a90585e Try forcing the commit 2021-03-08 18:42:16 -05:00
Jeff Kenney
b977d6544b pass root_dir using proper bash arg 2021-03-06 00:01:26 -08:00
Tom Hu
4c6543136b Merge pull request #226 from codecov/dependabot/npm_and_yarn/requestretry-5.0.0
Bump requestretry from 4.1.2 to 5.0.0
2021-03-05 09:51:08 -05:00
dependabot-preview[bot]
28d300eaea Bump requestretry from 4.1.2 to 5.0.0
Bumps [requestretry](https://github.com/FGRibreau/node-request-retry) from 4.1.2 to 5.0.0.
- [Release notes](https://github.com/FGRibreau/node-request-retry/releases)
- [Changelog](https://github.com/FGRibreau/node-request-retry/blob/master/CHANGELOG.md)
- [Commits](https://github.com/FGRibreau/node-request-retry/compare/v4.1.2...v5.0.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2021-03-05 14:35:11 +00:00
Tom Hu
36360aa09d Merge pull request #235 from codecov/dependabot/npm_and_yarn/eslint-7.21.0
Bump eslint from 7.19.0 to 7.21.0
2021-03-05 09:25:48 -05:00
Tom Hu
f215202b84 Merge pull request #236 from codecov/dependabot/npm_and_yarn/typescript-eslint/eslint-plugin-4.16.1
Bump @typescript-eslint/eslint-plugin from 4.15.0 to 4.16.1
2021-03-05 09:25:40 -05:00
Tom Hu
7cd1dd7eac Merge pull request #240 from codecov/dependabot/npm_and_yarn/typescript-4.2.3
Bump typescript from 4.1.5 to 4.2.3
2021-03-05 09:25:31 -05:00
dependabot-preview[bot]
98c0755768 Bump @typescript-eslint/eslint-plugin from 4.15.0 to 4.16.1
Bumps [@typescript-eslint/eslint-plugin](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/eslint-plugin) from 4.15.0 to 4.16.1.
- [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases)
- [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/CHANGELOG.md)
- [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v4.16.1/packages/eslint-plugin)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2021-03-05 13:32:38 +00:00
dependabot-preview[bot]
9347908382 Bump eslint from 7.19.0 to 7.21.0
Bumps [eslint](https://github.com/eslint/eslint) from 7.19.0 to 7.21.0.
- [Release notes](https://github.com/eslint/eslint/releases)
- [Changelog](https://github.com/eslint/eslint/blob/master/CHANGELOG.md)
- [Commits](https://github.com/eslint/eslint/compare/v7.19.0...v7.21.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2021-03-05 13:32:36 +00:00
dependabot-preview[bot]
ae688b209d Bump typescript from 4.1.5 to 4.2.3
Bumps [typescript](https://github.com/Microsoft/TypeScript) from 4.1.5 to 4.2.3.
- [Release notes](https://github.com/Microsoft/TypeScript/releases)
- [Commits](https://github.com/Microsoft/TypeScript/commits)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2021-03-05 13:32:28 +00:00
Tom Hu
d7eb181d2f Merge pull request #237 from codecov/dependabot/npm_and_yarn/typescript-eslint/parser-4.16.1
Bump @typescript-eslint/parser from 4.15.0 to 4.16.1
2021-03-05 08:30:51 -05:00
Tom Hu
a231e699a2 Merge pull request #238 from codecov/dependabot/npm_and_yarn/ts-jest-26.5.3
Bump ts-jest from 26.4.4 to 26.5.3
2021-03-05 08:24:35 -05:00
dependabot-preview[bot]
29fb46218a Bump ts-jest from 26.4.4 to 26.5.3
Bumps [ts-jest](https://github.com/kulshekhar/ts-jest) from 26.4.4 to 26.5.3.
- [Release notes](https://github.com/kulshekhar/ts-jest/releases)
- [Changelog](https://github.com/kulshekhar/ts-jest/blob/master/CHANGELOG.md)
- [Commits](https://github.com/kulshekhar/ts-jest/compare/v26.4.4...v26.5.3)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2021-03-04 06:25:21 +00:00
dependabot-preview[bot]
ad2aaf2f71 Bump @typescript-eslint/parser from 4.15.0 to 4.16.1
Bumps [@typescript-eslint/parser](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/parser) from 4.15.0 to 4.16.1.
- [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases)
- [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/parser/CHANGELOG.md)
- [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v4.16.1/packages/parser)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2021-03-02 06:28:48 +00:00
Tom Hu
ca774cf8f0 Merge pull request #214 from codecov/dependabot/npm_and_yarn/typescript-eslint/parser-4.15.0
Bump @typescript-eslint/parser from 4.14.0 to 4.15.0
2021-02-12 09:46:59 -05:00
Tom Hu
44d1ae6c73 Merge pull request #218 from codecov/dependabot/npm_and_yarn/typescript-4.1.5
Bump typescript from 4.1.3 to 4.1.5
2021-02-12 09:46:39 -05:00
dependabot-preview[bot]
ed0e49eac0 Bump typescript from 4.1.3 to 4.1.5
Bumps [typescript](https://github.com/Microsoft/TypeScript) from 4.1.3 to 4.1.5.
- [Release notes](https://github.com/Microsoft/TypeScript/releases)
- [Commits](https://github.com/Microsoft/TypeScript/compare/v4.1.3...v4.1.5)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2021-02-12 14:41:40 +00:00
dependabot-preview[bot]
ed1a046a3f Bump @typescript-eslint/parser from 4.14.0 to 4.15.0
Bumps [@typescript-eslint/parser](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/parser) from 4.14.0 to 4.15.0.
- [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases)
- [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/parser/CHANGELOG.md)
- [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v4.15.0/packages/parser)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2021-02-12 14:41:30 +00:00
Tom Hu
16636eb6e0 Merge pull request #213 from codecov/dependabot/npm_and_yarn/typescript-eslint/eslint-plugin-4.15.0
Bump @typescript-eslint/eslint-plugin from 4.14.0 to 4.15.0
2021-02-12 09:39:52 -05:00
dependabot-preview[bot]
b3274555d8 Bump @typescript-eslint/eslint-plugin from 4.14.0 to 4.15.0
Bumps [@typescript-eslint/eslint-plugin](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/eslint-plugin) from 4.14.0 to 4.15.0.
- [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases)
- [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/CHANGELOG.md)
- [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v4.15.0/packages/eslint-plugin)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2021-02-12 14:38:28 +00:00
Tom Hu
53f9cbed3c Merge pull request #210 from codecov/dependabot/npm_and_yarn/eslint-7.19.0
Bump eslint from 7.18.0 to 7.19.0
2021-02-12 09:36:38 -05:00
dependabot-preview[bot]
14434e0c72 Bump eslint from 7.18.0 to 7.19.0
Bumps [eslint](https://github.com/eslint/eslint) from 7.18.0 to 7.19.0.
- [Release notes](https://github.com/eslint/eslint/releases)
- [Changelog](https://github.com/eslint/eslint/blob/master/CHANGELOG.md)
- [Commits](https://github.com/eslint/eslint/compare/v7.18.0...v7.19.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2021-02-01 06:54:34 +00:00
Tom Hu
2838b54ec2 Merge pull request #202 from codecov/dependabot/npm_and_yarn/eslint-7.18.0
Bump eslint from 7.17.0 to 7.18.0
2021-01-21 13:11:58 -05:00
Tom Hu
33faa01b4d Merge pull request #197 from codecov/dependabot/npm_and_yarn/types/jest-26.0.20
Bump @types/jest from 26.0.19 to 26.0.20
2021-01-21 13:07:36 -05:00
dependabot-preview[bot]
ebab471b65 Bump eslint from 7.17.0 to 7.18.0
Bumps [eslint](https://github.com/eslint/eslint) from 7.17.0 to 7.18.0.
- [Release notes](https://github.com/eslint/eslint/releases)
- [Changelog](https://github.com/eslint/eslint/blob/master/CHANGELOG.md)
- [Commits](https://github.com/eslint/eslint/compare/v7.17.0...v7.18.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2021-01-21 18:07:08 +00:00
Tom Hu
1789bbabef Merge pull request #203 from codecov/dependabot/npm_and_yarn/typescript-eslint/eslint-plugin-4.14.0
Bump @typescript-eslint/eslint-plugin from 4.11.1 to 4.14.0
2021-01-21 13:05:19 -05:00
dependabot-preview[bot]
eedcbd59dc Bump @typescript-eslint/eslint-plugin from 4.11.1 to 4.14.0
Bumps [@typescript-eslint/eslint-plugin](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/eslint-plugin) from 4.11.1 to 4.14.0.
- [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases)
- [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/CHANGELOG.md)
- [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v4.14.0/packages/eslint-plugin)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2021-01-21 17:10:39 +00:00
Tom Hu
83e6a29c16 Merge pull request #204 from codecov/dependabot/npm_and_yarn/typescript-eslint/parser-4.14.0
Bump @typescript-eslint/parser from 4.11.1 to 4.14.0
2021-01-21 12:08:55 -05:00
dependabot-preview[bot]
dd9b809996 Bump @typescript-eslint/parser from 4.11.1 to 4.14.0
Bumps [@typescript-eslint/parser](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/parser) from 4.11.1 to 4.14.0.
- [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases)
- [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/parser/CHANGELOG.md)
- [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v4.14.0/packages/parser)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2021-01-19 06:24:43 +00:00
dependabot-preview[bot]
61b20ce181 Bump @types/jest from 26.0.19 to 26.0.20
Bumps [@types/jest](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/jest) from 26.0.19 to 26.0.20.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/jest)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2021-01-08 07:10:04 +00:00
Tom Hu
e156083f13 Merge pull request #196 from codecov/1.2.1
Add parameters to the action.yml
2021-01-05 23:27:57 -05:00
Tom Hu
e9131c5f9c Add parameters to the action.yml 2021-01-05 17:31:56 -05:00
Tom Hu
a92c414703 Merge pull request #193 from codecov/v2
Add all the bash params
2021-01-04 09:28:24 -05:00
Tom Hu
8d13d6a7ba cleanup 2021-01-02 19:18:26 -05:00
Tom Hu
1acc162055 permissions? 2021-01-02 19:16:25 -05:00
Tom Hu
6961e2c698 lint 2021-01-02 19:13:56 -05:00
Tom Hu
431265badf Update linter 2021-01-02 19:03:40 -05:00
Tom Hu
5dca80cf76 lint 2021-01-02 19:02:52 -05:00
Tom Hu
4dcb7122e5 lint 2021-01-02 19:01:39 -05:00
Tom Hu
be4e2a5e02 Update changelog 2021-01-02 18:53:08 -05:00
Tom Hu
40b489d797 Fix test 2021-01-02 18:51:07 -05:00
Tom Hu
853e99ac9d Update test 2021-01-02 18:47:08 -05:00
Tom Hu
1794277aa5 Add test 2021-01-02 18:45:08 -05:00
Tom Hu
27a4acecbb Split out buildExec 2021-01-02 18:30:42 -05:00
Tom Hu
0ad87e5850 Remove codecov.sh 2021-01-02 18:22:49 -05:00
Tom Hu
25cb7e3abf coverage-test 2021-01-02 18:19:58 -05:00
Tom Hu
a0e7a095bd Edit package.json 2021-01-02 18:16:30 -05:00
Tom Hu
2e67f32735 a name 2021-01-02 18:06:16 -05:00
Tom Hu
7a024964de Update test files 2021-01-02 18:02:41 -05:00
Tom Hu
e16afe2276 Fix test 2021-01-02 17:53:08 -05:00
Tom Hu
c0466185ef Add tests 2021-01-02 17:50:17 -05:00
Tom Hu
56353bc0f0 js is hard 2021-01-02 17:02:54 -05:00
Tom Hu
d9d5217980 more console 2021-01-02 16:56:42 -05:00
Tom Hu
8ad88ccc68 Console 2021-01-02 16:54:32 -05:00
Tom Hu
6a4eded237 Merge branch 'v2' of https://github.com/codecov/codecov-action into v2 2021-01-02 16:48:58 -05:00
Tom Hu
25b873867a Add all the bash params 2021-01-02 16:42:39 -05:00
Tom Hu
8323165032 Add all the bash params 2021-01-02 14:04:08 -05:00
Tom Hu
5b42a305f9 Merge pull request #179 from codecov/dependabot/npm_and_yarn/typescript-4.1.3
Bump typescript from 4.1.2 to 4.1.3
2020-12-21 16:13:42 -05:00
Tom Hu
29c457e537 Merge pull request #187 from codecov/dependabot/npm_and_yarn/node-notifier-8.0.1
[Security] Bump node-notifier from 8.0.0 to 8.0.1
2020-12-21 16:13:24 -05:00
dependabot-preview[bot]
b3ee0b08ef [Security] Bump node-notifier from 8.0.0 to 8.0.1
Bumps [node-notifier](https://github.com/mikaelbr/node-notifier) from 8.0.0 to 8.0.1. **This update includes a security fix.**
- [Release notes](https://github.com/mikaelbr/node-notifier/releases)
- [Changelog](https://github.com/mikaelbr/node-notifier/blob/v8.0.1/CHANGELOG.md)
- [Commits](https://github.com/mikaelbr/node-notifier/compare/v8.0.0...v8.0.1)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-12-21 16:44:47 +00:00
Tom Hu
133f89a6b7 Merge pull request #185 from codecov/makefile
Actually have a makefile
2020-12-21 09:24:14 -05:00
Tom Hu
a03d57cdbd Actually have a makefile 2020-12-21 09:05:03 -05:00
Tom Hu
1fc7722ded Merge pull request #184 from codecov/makefile
Add automations ensure proper builds and deployments | Fix verbose flag
2020-12-21 08:57:25 -05:00
Tom Hu
08574d831c Add dist file 2020-12-20 17:04:06 -05:00
Tom Hu
0c1af46295 Update install script 2020-12-20 17:03:30 -05:00
Tom Hu
f8c87eb84e Update changelog 2020-12-20 17:02:09 -05:00
Tom Hu
8b988c28b0 Fix verbose flag 2020-12-20 17:01:12 -05:00
Tom Hu
4686d7034c Udpate CHANGELOG 2020-12-20 16:59:47 -05:00
Tom Hu
4ef30f27a0 Update changelog 2020-12-20 16:59:07 -05:00
Tom Hu
58cd650984 Update package-lock 2020-12-20 16:58:24 -05:00
Tom Hu
efb844969e force 2020-12-20 16:57:50 -05:00
Tom Hu
c6de3f8548 Add makefile and automations 2020-12-20 16:57:08 -05:00
Tom Hu
7de43a7373 Merge pull request #180 from codecov/1.1.0
Bump to 1.1.0
2020-12-17 13:21:17 -05:00
Tom Hu
09facdbe25 Merge pull request #110 from khaeru/working-dir
Add "working-directory:" input
2020-12-16 11:21:50 -05:00
Paul Natsuo Kishimoto
c770ad46b3 Add "working-directory:" to README 2020-12-15 11:41:23 +01:00
Paul Natsuo Kishimoto
55dde41e2b Add "working-directory:" setting 2020-12-15 11:40:37 +01:00
dependabot-preview[bot]
11de6e2a71 Bump typescript from 4.1.2 to 4.1.3
Bumps [typescript](https://github.com/Microsoft/TypeScript) from 4.1.2 to 4.1.3.
- [Release notes](https://github.com/Microsoft/TypeScript/releases)
- [Commits](https://github.com/Microsoft/TypeScript/commits)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-12-14 07:09:15 +00:00
Tom Hu
beb5a9626e Merge pull request #178 from codecov/dependabot/npm_and_yarn/types/jest-26.0.19
Bump @types/jest from 26.0.15 to 26.0.19
2020-12-12 21:36:05 -05:00
dependabot-preview[bot]
a869df4496 Bump @types/jest from 26.0.15 to 26.0.19
Bumps [@types/jest](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/jest) from 26.0.15 to 26.0.19.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/jest)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-12-11 06:30:54 +00:00
Tom Hu
a116b3286f Merge pull request #169 from codecov/dependabot/npm_and_yarn/typescript-4.1.2
Bump typescript from 4.0.5 to 4.1.2
2020-12-09 21:42:17 -05:00
Tom Hu
a6c42c7a01 Merge pull request #174 from kingpowerclick/xcode-derived-data
Support Xcode specificed parameters
2020-12-09 21:36:55 -05:00
dependabot-preview[bot]
3c9462a34c Bump typescript from 4.0.5 to 4.1.2
Bumps [typescript](https://github.com/Microsoft/TypeScript) from 4.0.5 to 4.1.2.
- [Release notes](https://github.com/Microsoft/TypeScript/releases)
- [Commits](https://github.com/Microsoft/TypeScript/compare/v4.0.5...v4.1.2)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-12-09 16:36:50 +00:00
Tom Hu
5155bd4dd2 Merge pull request #166 from codecov/dependabot/npm_and_yarn/requestretry-4.1.2
Bump requestretry from 4.1.1 to 4.1.2
2020-12-09 11:35:04 -05:00
Wipoo Shinsirikul
c047d5942e Support Xcode specificed parameters 2020-12-05 20:31:36 +07:00
dependabot-preview[bot]
3db8e6c626 Bump requestretry from 4.1.1 to 4.1.2
Bumps [requestretry](https://github.com/FGRibreau/node-request-retry) from 4.1.1 to 4.1.2.
- [Release notes](https://github.com/FGRibreau/node-request-retry/releases)
- [Changelog](https://github.com/FGRibreau/node-request-retry/blob/master/CHANGELOG.md)
- [Commits](https://github.com/FGRibreau/node-request-retry/compare/v4.1.1...v4.1.2)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-11-12 06:46:28 +00:00
24 changed files with 10527 additions and 53017 deletions

19
.eslintrc.json Normal file
View File

@@ -0,0 +1,19 @@
{
"env": {
"browser": true,
"commonjs": true,
"es2021": true
},
"extends": [
"google"
],
"parser": "@typescript-eslint/parser",
"parserOptions": {
"ecmaVersion": 12
},
"plugins": [
"@typescript-eslint"
],
"rules": {
}
}

7
.github/dependabot.yml vendored Normal file
View File

@@ -0,0 +1,7 @@
version: 2
updates:
- package-ecosystem: npm
directory: "/"
schedule:
interval: daily
open-pull-requests-limit: 10

View File

@@ -5,23 +5,23 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@master
uses: actions/checkout@v2
- name: Install dependencies
run: npm install
- name: Lint
run: npm run lint
- name: Run tests and collect coverage
run: yarn run test-all
- name: Upload coverage to Codecov
run: yarn run test
- name: Upload coverage to Codecov (demo)
uses: ./
with:
files: ./coverage/calculator/coverage-final.json,./coverage/index/coverage-final.json
files: ./coverage/calculator/coverage-final.json,./coverage/coverage-test/coverage-final.json
file: ./coverage/coverage-final.json
flags: unittest
name: codecov-1
- name: Upload coverage to Codecov (verbose)
flags: demo
name: codecov-demo
- name: Upload coverage to Codecov (script)
uses: ./
with:
files: ./coverage/calculator/coverage-final.json,./coverage/index/coverage-final.json
file: ./coverage/coverage-final.json
flags: unittest
name: codecov-1
verbose: true
files: ./coverage/script/coverage-final.json
flags: script
name: codecov-script

View File

@@ -1,13 +1,67 @@
### 1.1.0
## 1.5.0
### Features
- #299 Pull Codecov bash script into the action
#### Features
### Dependencies
- #271 Bump typescript from 4.2.3 to 4.2.4
- #277 Bump @typescript-eslint/eslint-plugin from 4.16.1 to 4.22.0
- #278 Bump @typescript-eslint/parser from 4.20.0 to 4.22.0
- #279 Bump @actions/core from 1.2.6 to 1.2.7
- #292 Bump ts-jest from 26.5.3 to 26.5.5
- #293 Bump eslint from 7.21.0 to 7.25.0
- #297 Bump @types/jest from 26.0.20 to 26.0.23
- #298 Upgrade to GitHub-native Dependabot
## 1.4.1
### Fixes
- #287 Update VERSION regex to restrict on digits and dot and move checksums into script
## 1.4.0
### Features
- #282 Add checksum verification of bash script
## 1.3.2
### Fixes
- #264 Overwrites pr number for pull_request_target events
## 1.3.1
### Fixes
- #253 Add `network_filter` to action manifest
## 1.3.0
### Features
- #252 Add "network_filter" input
## 1.2.2
### Fixes
- #241 pass root_dir using proper bash arg
- #244 Overwrite the commit on pull_request* events
## 1.2.1
### Fixes
- #196 Add parameters to the action.yml
## 1.2.0
### Features
- #193 Add all the bash params
### Fixes
- #193 Fixes issue with working-directory
## 1.1.1
### Fixes
- #184 Add automations ensure proper builds and deployments
- #184 Fixes verbose flag
## 1.1.0
### Features
- #110 Add "working-directory:" input
- #174 Support Xcode specificed parameters
#### Fixes
### Fixes
- #172 File is saved as text
#### Dependencies and Misc
### Dependencies and Misc
- #166 Bump requestretry from 4.1.1 to 4.1.2
- #169 Bump typescript from 4.0.5 to 4.1.2
- #178 Bump @types/jest from 26.0.15 to 26.0.19

7
Makefile Normal file
View File

@@ -0,0 +1,7 @@
deploy:
$(eval VERSION := $(shell cat package.json | grep '"version": ' | cut -d\" -f4))
git tag -d v1
git push origin :v1
git tag v1
git tag v$(VERSION) -m ""
git push origin --tags

View File

@@ -20,7 +20,6 @@ steps:
- uses: codecov/codecov-action@v1
with:
token: ${{ secrets.CODECOV_TOKEN }} # not required for public repos
file: ./coverage.xml # optional
files: ./coverage1.xml,./coverage2.xml # optional
flags: unittests # optional
name: codecov-umbrella # optional
@@ -33,20 +32,47 @@ steps:
Codecov's Action currently supports five inputs from the user: `token`, `file`, `flags`,`name`, and `fail_ci_if_error`. These inputs, along with their descriptions and usage contexts, are listed in the table below:
>**Update**: We've removed the `yml` parameter with the latest release of this action. Please put your custom codecov yaml file at the root of the repo because other locations will no longer be supported in the future.
| Input | Description | Usage |
| :---: | :---: | :---: |
| `token` | Used to authorize coverage report uploads | *Required for private repos* |
| `file` | Path to the coverage report(s) | Optional
| `files` | Comma-separated paths to the coverage report(s) | Optional
| `directory` | Directory to search for coverage reports. | Optional
| `flags` | Flag the upload to group coverage metrics (unittests, uitests, etc.). Multiple flags are separated by a comma (ui,chrome) | Optional
| | |
| `aws_curl_args` | Extra curl arguments to communicate with AWS. | Optional
| `codecov_curl_args` | Extra curl arguments to communicate with Codecov. e.g., -U "--proxy http://http-proxy" | Optional
| `commit_parent` | The commit SHA of the parent for which you are uploading coverage. If not present, the parent will be determined using the API of your repository provider. When using the repository provider's API, the parent is determined via finding the closest ancestor to the commit. | Optional
| `env_vars` | Environment variables to tag the upload with. Multiple env variables can be separated with commas (e.g. `OS,PYTHON`) | Optional
| `name` | Custom defined name for the upload | Optional
| `fail_ci_if_error` | Specify if CI pipeline should fail when Codecov runs into errors during upload. *Defaults to **false*** | Optional
| `functionalities` | Toggle functionalities | Optional
| | `coveragepy` Disable python coverage |
| | `fix` Disable report fixing |
| | `gcov` Disable gcov |
| | `gcovout` Disable gcov output |
| | `html` Enable coverage for HTML files |
| | `network` Disable uploading the file network |
| | `recursesubs` Enable recurse submodules in git projects when searching for source files | |
| | `search` Disable searching for reports |
| | `xcode` Disable xcode processing |
| `gcov_path_include` | Paths to include during gcov gathering (as a glob) | Optional
| `gcov_args` | extra arguments to pass to gcov | Optional
| `gcov_executable` | gcov executable to run. Defaults to 'gcov' | Optional
| `gcov_path_exclude` | Paths to ignore during gcov gathering (as a glob) | Optional
| `gcov_prefix` | Prefix filepaths to help resolve path fixing | Optional
| `gcov_root_dir` | Project root directory, also used when preparing gcov | Optional
| `move_coverage_to_trash` | Move discovered coverage reports to the trash | Optional
| `name` | Custom defined name for the upload | Optional
| `override_branch` | Specify the branch name | Optional
| `override_build` | Specify the build number | Optional
| `override_commit` | Specify the commit SHA | Optional
| `override_pr` | Specify the pull request number | Optional
| `override_tag` | Specify the git tag | Optional
| `path_to_write_report` | Write upload file to path before uploading | Optional
| `root_dir` | Used when not in git/hg project to identify project root directory | Optional
| `verbose` | Specify whether the Codecov output should be verbose | Optional
| `working-directory` | Directory in which to execute `codecov.sh` | Optional
| `xcode_derived_data` | Custom Derived Data Path for Coverage.profdata and gcov processing | Optional
| `xcode_package` | Specify packages to build coverage. Uploader will only build these packages. This can significantly reduces time to build coverage reports. -J 'MyAppName' Will match "MyAppName" and "MyAppNameTests" -J '^ExampleApp$' Will match only "ExampleApp" not "ExampleAppTests" | Optional
### Example `workflow.yml` with Codecov Action
@@ -77,7 +103,6 @@ jobs:
uses: codecov/codecov-action@v1
with:
token: ${{ secrets.CODECOV_TOKEN }}
file: ./coverage.xml
files: ./coverage1.xml,./coverage2.xml
directory: ./coverage/reports/
flags: unittests

View File

@@ -2,15 +2,9 @@ name: 'Codecov'
description: 'GitHub Action that uploads coverage reports for your repository to codecov.io'
author: 'Ibrahim Ali <@ibrahim0814> & Thomas Hu <@thomasrockhu> | Codecov'
inputs:
name:
description: 'User defined upload name. Visible in Codecov UI'
required: false
token:
description: 'Repository upload token - get it from codecov.io. Required only for private repositories'
required: false
file:
description: 'Path to coverage file to upload'
required: false
files:
description: 'Comma-separated list of files to upload'
required: false
@@ -20,8 +14,14 @@ inputs:
flags:
description: 'Flag upload to group coverage metrics (e.g. unittests | integration | ui,chrome)'
required: false
path_to_write_report:
description: 'Write upload file to path before uploading'
aws_curl_args:
description: 'Extra curl arguments to communicate with AWS.'
required: false
codecov_curl_args:
description: 'Extra curl arguments to communicate with Codecov. e.g., -U "--proxy http://http-proxy"'
required: false
commit_parent:
description: 'The commit SHA of the parent for which you are uploading coverage. If not present, the parent will be determined using the API of your repository provider. When using the repository providers API, the parent is determined via finding the closest ancestor to the commit.'
required: false
env_vars:
description: 'Environment variables to tag the upload with (e.g. PYTHON | OS,PYTHON)'
@@ -29,9 +29,72 @@ inputs:
fail_ci_if_error:
description: 'Specify whether or not CI build should fail if Codecov runs into an error during upload'
required: false
file:
description: 'Path to coverage file to upload'
required: false
functionalities:
description: 'Comma-separated list, see the README for options and their usage'
required: false
gcov_args:
description: 'extra arguments to pass to gcov'
required: false
gcov_executable:
description: 'gcov executable to run. Defaults to gcov'
required: false
gcov_path_exclude:
description: 'Paths to ignore during gcov gathering (as a glob)'
required: false
gcov_path_include:
description: 'Paths to include during gcov gathering (as a glob)'
required: false
gcov_prefix:
description: 'Prefix filepaths to help resolve path fixing'
required: false
gcov_root_dir:
description: 'Project root directory, also used when preparing gcov'
required: false
move_coverage_to_trash:
description: 'Move discovered coverage reports to the trash'
required: false
name:
description: 'User defined upload name. Visible in Codecov UI'
required: false
network_filter:
description: 'Used to restrict the set of git/hg files that can be matched with filenames in the coverage report. This is useful for monorepos or other setups where a full filepath may not be specified in the coverage report, and that shortened filepath may appear multiple times in a directory structure (e.g. __init__.py)'
required: false
override_branch:
description: 'Specify the branch name'
required: false
override_build:
description: 'Specify the build number'
required: false
override_commit:
description: 'Specify the commit SHA'
required: false
override_pr:
description: 'Specify the pull request number'
required: false
override_tag:
description: 'Specify the git tag'
required: false
path_to_write_report:
description: 'Write upload file to path before uploading'
required: false
root_dir:
description: 'Used when not in git/hg project to identify project root directory'
required: false
verbose:
description: 'Specify whether the Codecov output should be verbose'
required: false
working-directory:
description: 'Directory in which to execute codecov.sh'
required: false
xcode_derived_data:
description: 'Custom Derived Data Path for Coverage.profdata and gcov processing'
required: false
xcode_package:
description: 'Specify packages to build coverage. Uploader will only build these packages'
required: false
branding:
color: 'red'
icon: 'umbrella'

View File

@@ -0,0 +1,11 @@
import Coverage from "./coverage";
test('test uncovered if', () => {
const coverageObj = new Coverage();
expect(coverageObj.uncovered_if()).toEqual(false);
});
test('fully covered', () => {
const coverageObj = new Coverage();
expect(coverageObj.fully_covered()).toEqual(true);
});

View File

@@ -1,4 +1,4 @@
export default class Index {
export default class Coverage {
//This function is tested and part of it is uncovered
uncovered_if = (a = true) => {

1884
dist/codecov vendored Normal file

File diff suppressed because it is too large Load Diff

57938
dist/index.js vendored

File diff suppressed because one or more lines are too long

8
hooks/pre-commit Executable file
View File

@@ -0,0 +1,8 @@
#!/usr/bin/env bash
npm i --package-lock-only
npm run lint --fix
npm run build
git add src/
git add dist/
git add package-lock.json

174
index.js
View File

@@ -1,174 +0,0 @@
const core = require("@actions/core");
const exec = require("@actions/exec");
const fs = require("fs");
const request = require('requestretry');
let fail_ci;
try {
const name = core.getInput("name");
const token = core.getInput("token");
const flags = core.getInput("flags");
const file = core.getInput("file");
const files = core.getInput("files");
const env_vars = core.getInput("env_vars");
const dir = core.getInput("directory");
const write_path = core.getInput("path_to_write_report");
const verbose = core.getInput("verbose");
fail_ci = core.getInput("fail_ci_if_error").toLowerCase();
if (
fail_ci === "yes" ||
fail_ci === "y" ||
fail_ci === "true" ||
fail_ci === "t" ||
fail_ci === "1"
) {
fail_ci = true;
} else {
fail_ci = false;
}
request({
json: false,
maxAttempts: 10,
timeout: 3000,
url: "https://codecov.io/bash"
}, (error, response, body) => {
try {
if (error && fail_ci) {
throw error;
} else if (error) {
core.warning(`Codecov warning: ${error.message}`);
}
fs.writeFile("codecov.sh", body, err => {
if (err && fail_ci) {
throw err;
} else if (err) {
core.warning(`Codecov warning: ${err.message}`);
}
let output = "";
let execError = "";
const options = {};
options.listeners = {
stdout: data => {
output += data.toString();
},
stderr: data => {
execError += data.toString();
}
};
options.env = Object.assign(process.env, {
GITHUB_ACTION: process.env.GITHUB_ACTION,
GITHUB_RUN_ID: process.env.GITHUB_RUN_ID,
GITHUB_REF: process.env.GITHUB_REF,
GITHUB_REPOSITORY: process.env.GITHUB_REPOSITORY,
GITHUB_SHA: process.env.GITHUB_SHA,
GITHUB_HEAD_REF: process.env.GITHUB_HEAD_REF || ''
});
if(token){
options.env.CODECOV_TOKEN = token
}
const env_vars_arg = []
for (let env_var of env_vars.split(",")) {
let env_var_clean = env_var.trim();
if (env_var_clean) {
options.env[env_var_clean] = process.env[env_var_clean];
env_vars_arg.push(env_var_clean)
}
}
const execArgs = ["codecov.sh"];
execArgs.push("-Q", "github-action");
if (file) {
execArgs.push(
"-f", `${file}`
);
}
if (files) {
files.split(',').forEach(f => {
execArgs.push(
"-f", `${f}`
);
});
}
if (dir) {
execArgs.push(
"-s", `${dir}`
);
}
execArgs.push(
"-n", `${name}`,
"-F", `${flags}`
);
if (fail_ci) {
execArgs.push(
"-Z"
);
}
if (env_vars_arg.length) {
execArgs.push(
"-e", env_vars_arg.join(",")
);
}
if (write_path) {
execArgs.push(
"-q", `${write_path}`
);
}
if (verbose) {
execArgs.push(
"-v"
);
}
exec.exec("bash", execArgs, options)
.catch(err => {
if (fail_ci) {
core.setFailed(
`Codecov failed with the following error: ${err.message}`
);
} else {
core.warning(`Codecov warning: ${err.message}`);
}
})
.then(() => {
unlinkFile();
});
const unlinkFile = () => {
fs.unlink("codecov.sh", err => {
if (err && fail_ci) {
throw err;
} else if (err) {
core.warning(`Codecov warning: ${err.message}`);
}
});
};
});
} catch (error) {
core.setFailed(
`Codecov failed with the following error: ${error.message}`
);
}
});
} catch (error) {
if (fail_ci) {
core.setFailed(`Codecov failed with the following error: ${error.message}`);
} else {
core.warning(`Codecov warning: ${error.message}`);
}
}

12
install.sh Executable file
View File

@@ -0,0 +1,12 @@
#!/usr/bin/env bash
if ! [ -e .git ]; then
echo "Please run this from repo root directory"
exit 1
fi
cd .git/hooks
for i in pre-commit; do
rm -fv $i
ln -sv ../../hooks/$i
done

1042
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@@ -1,14 +1,15 @@
{
"name": "codecov-action",
"version": "1.0.16",
"version": "1.5.0",
"description": "Upload coverage reports to Codecov from GitHub Actions",
"main": "index.js",
"scripts": {
"test": "jest --coverage",
"test-calculator": "jest --testPathPattern=src/calculator/ --coverage --coverageDirectory=coverage/calculator",
"test-index": "jest --testPathPattern=src/index --coverage --coverageDirectory=coverage/index",
"test-all": "yarn run test && yarn run test-calculator && yarn run test-index",
"build": "ncc build index.js"
"lint": "eslint src/*.*",
"test": "yarn run test-script && yarn run test-calculator && yarn run test-coverage",
"test-calculator": "jest --testPathPattern=demo/calculator/ --coverage --coverageDirectory=coverage/calculator",
"test-coverage": "jest --testPathPattern=demo/coverage-test/ --coverage --coverageDirectory=coverage/coverage-test",
"test-script": "jest --testPathPattern=src/ --coverage --coverageDirectory=coverage/script",
"build": "ncc build src/index.ts"
},
"repository": {
"type": "git",
@@ -22,18 +23,23 @@
},
"homepage": "https://github.com/codecov/codecov-action#readme",
"dependencies": {
"@actions/core": "^1.2.6",
"@actions/core": "^1.2.7",
"@actions/exec": "^1.0.4",
"@types/jest": "^26.0.15",
"@actions/github": "^4.0.0",
"@types/jest": "^26.0.23",
"@zeit/ncc": "^0.22.3",
"fs": "0.0.1-security",
"jest": "^26.6.3",
"jest-junit": "^12.0.0",
"request": "^2.88.2",
"requestretry": "^4.1.1",
"ts-jest": "^26.4.4",
"typescript": "^4.0.5",
"ts-jest": "^26.5.5",
"typescript": "^4.2.4",
"yarn": "^1.22.10"
},
"devDependencies": {}
"devDependencies": {
"@typescript-eslint/eslint-plugin": "^4.22.0",
"@typescript-eslint/parser": "^4.22.0",
"eslint": "^7.25.0",
"eslint-config-google": "^0.14.0"
}
}

148
src/buildExec.test.ts Normal file
View File

@@ -0,0 +1,148 @@
import buildExec from './buildExec';
const github = require('@actions/github');
const context = github.context;
test('no arguments', () => {
const {execArgs, filepath, failCi} = buildExec();
const args = [
'codecov.sh',
'-n',
'',
'-F',
'',
'-Q',
'github-action',
];
if (context.eventName == 'pull_request') {
args.push('-C', `${context.payload.pull_request.head.sha}`);
}
expect(execArgs).toEqual(args);
expect(filepath).toEqual('codecov.sh');
expect(failCi).toBeFalsy();
});
test('all arguments', () => {
const envs = {
'move_coverage_to_trash': 'true',
'commit_parent': '83231650328f11695dfb754ca0f540516f188d27',
'aws_curl_args': '--timeout 1',
'codecov_curl_args': '--timeout 2',
'env_vars': 'OS,PYTHON',
'fail_ci_if_error': 'true',
'file': 'coverage.xml',
'files': 'dir1/coverage.xml,dir2/coverage.xml',
'flags': 'test',
'functionalities':
'gcov,coveragepy,fix,search,code,network,gcovout,html,recursesubs',
'gcov_args': '--timeout 3',
'gcov_root_dr': 'gcov_dir/',
'gcov_path_exclude': '**/exclude-dir/*.*',
'gcov_executable': 'gcov',
'gcov_path_include': '**/include-dir/*.*',
'gcov_prefix': 'demo',
'name': 'codecov',
'network_filter': 'dir1',
'override_branch': 'thomasrockhu/test',
'override_build': '1',
'override_commit': '9caabca5474b49de74ef5667deabaf74cdacc244',
'override_pr': '2',
'override_tag': 'v1.2',
'root_dir': 'root/',
'directory': 'coverage/',
'token': 'd3859757-ab80-4664-924d-aef22fa7557b',
'verbose': 't',
'working-directory': 'src',
'path_to_write_report': 'codecov/',
'xcode_derived_data': '~/Library/Developer/Xcode/DerivedData',
'xcode_package': 'MyApp',
};
for (const env of Object.keys(envs)) {
process.env['INPUT_' + env.toUpperCase()] = envs[env];
}
const {execArgs, filepath, failCi} = buildExec();
expect(execArgs).toEqual([
'src/codecov.sh',
'-n',
'codecov',
'-F',
'test',
'-Q',
'github-action',
'-c',
'-N',
'83231650328f11695dfb754ca0f540516f188d27',
'-A',
'--timeout 1',
'-U',
'--timeout 2',
'-e',
'OS,PYTHON',
'-Z',
'-f',
'coverage.xml',
'-f',
'dir1/coverage.xml',
'-f',
'dir2/coverage.xml',
'-X',
'gcov',
'-X',
'coveragepy',
'-X',
'fix',
'-X',
'search',
'-X',
'code',
'-X',
'network',
'-X',
'gcovout',
'-X',
'html',
'-X',
'recursesubs',
'-a',
'--timeout 3',
'-g',
'**/exclude-dir/*.*',
'-x',
'gcov',
'-G',
'**/include-dir/*.*',
'-k',
'demo',
'-i',
'dir1',
'-B',
'thomasrockhu/test',
'-b',
'1',
'-C',
'9caabca5474b49de74ef5667deabaf74cdacc244',
'-P',
'2',
'-T',
'v1.2',
'-R',
'root/',
'-s',
'coverage/',
'-v',
'-q',
'codecov/',
'-D',
'~/Library/Developer/Xcode/DerivedData',
'-J',
'MyApp',
]);
expect(filepath).toEqual('src/codecov.sh');
expect(failCi).toBeTruthy();
for (const env of Object.keys(envs)) {
delete process.env['INPUT_' + env.toUpperCase()];
}
});

179
src/buildExec.ts Normal file
View File

@@ -0,0 +1,179 @@
const core = require('@actions/core');
const github = require('@actions/github');
const context = github.context;
const isTrue = (variable) => {
const lowercase = variable.toLowerCase();
return (
lowercase === '1' ||
lowercase === 't' ||
lowercase === 'true' ||
lowercase === 'y' ||
lowercase === 'yes'
);
};
const buildExec = () => {
const clean = core.getInput('move_coverage_to_trash');
const commitParent = core.getInput('commit_parent');
const curlAwsArgs = core.getInput('aws_curl_args');
const curlCodecovArgs = core.getInput('codecov_curl_args');
const envVars = core.getInput('env_vars');
const failCi = isTrue(core.getInput('fail_ci_if_error'));
const file = core.getInput('file');
const files = core.getInput('files');
const flags = core.getInput('flags');
const functionalities = core.getInput('functionalities');
const gcovArgs = core.getInput('gcov_args');
const gcovDir = core.getInput('gcov_root_dir');
const gcovExclude = core.getInput('gcov_path_exclude');
const gcovExec = core.getInput('gcov_executable');
const gcovInclude = core.getInput('gcov_path_include');
const gcovPrefix = core.getInput('gcov_prefix');
const name = core.getInput('name');
const networkFilter = core.getInput('network_filter');
const overrideBranch = core.getInput('override_branch');
const overrideBuild = core.getInput('override_build');
const overrideCommit = core.getInput('override_commit');
const overridePr = core.getInput('override_pr');
const overrideTag = core.getInput('override_tag');
const rootDir = core.getInput('root_dir');
const searchDir = core.getInput('directory');
const token = core.getInput('token');
const verbose = isTrue(core.getInput('verbose'));
const workingDir = core.getInput('working-directory');
const writePath = core.getInput('path_to_write_report');
const xcodeDerivedData = core.getInput('xcode_derived_data');
const xcodePackage = core.getInput('xcode_package');
const filepath = workingDir ?
workingDir + '/codecov.sh' : 'codecov.sh';
const execArgs = [filepath];
execArgs.push( '-n', `${name}`, '-F', `${flags}`, '-Q', 'github-action' );
const options:any = {};
options.env = Object.assign(process.env, {
GITHUB_ACTION: process.env.GITHUB_ACTION,
GITHUB_RUN_ID: process.env.GITHUB_RUN_ID,
GITHUB_REF: process.env.GITHUB_REF,
GITHUB_REPOSITORY: process.env.GITHUB_REPOSITORY,
GITHUB_SHA: process.env.GITHUB_SHA,
GITHUB_HEAD_REF: process.env.GITHUB_HEAD_REF || '',
});
const envVarsArg = [];
for (const envVar of envVars.split(',')) {
const envVarClean = envVar.trim();
if (envVarClean) {
options.env[envVarClean] = process.env[envVarClean];
envVarsArg.push(envVarClean);
}
}
if (token) {
options.env.CODECOV_TOKEN = token;
}
if (clean) {
execArgs.push('-c');
}
if (commitParent) {
execArgs.push('-N', `${commitParent}`);
}
if (curlAwsArgs) {
execArgs.push('-A', `${curlAwsArgs}`);
}
if (curlCodecovArgs) {
execArgs.push('-U', `${curlCodecovArgs}`);
}
if (envVarsArg.length) {
execArgs.push('-e', envVarsArg.join(','));
}
if (failCi) {
execArgs.push('-Z');
}
if (file) {
execArgs.push('-f', `${file}`);
}
if (files) {
files.split(',').forEach((f) => {
execArgs.push('-f', `${f}`);
});
}
if (functionalities) {
functionalities.split(',').forEach((f) => {
execArgs.push('-X', `${f}`);
});
}
if (gcovArgs) {
execArgs.push('-a', `${gcovArgs}`);
}
if (gcovDir) {
execArgs.push('-p', `${gcovDir}`);
}
if (gcovExclude) {
execArgs.push('-g', `${gcovExclude}`);
}
if (gcovExec) {
execArgs.push('-x', `${gcovExec}`);
}
if (gcovInclude) {
execArgs.push('-G', `${gcovInclude}`);
}
if (gcovPrefix) {
execArgs.push('-k', `${gcovPrefix}`);
}
if (networkFilter) {
execArgs.push('-i', `${networkFilter}`);
}
if (overrideBranch) {
execArgs.push('-B', `${overrideBranch}`);
}
if (overrideBuild) {
execArgs.push('-b', `${overrideBuild}`);
}
if (overrideCommit) {
execArgs.push('-C', `${overrideCommit}`);
} else if (
`${context.eventName}` == 'pull_request' ||
`${context.eventName}` == 'pull_request_target'
) {
execArgs.push('-C', `${context.payload.pull_request.head.sha}`);
}
if (overridePr) {
execArgs.push('-P', `${overridePr}`);
} else if (
`${context.eventName}` == 'pull_request_target'
) {
execArgs.push('-P', `${context.payload.number}`);
}
if (overrideTag) {
execArgs.push('-T', `${overrideTag}`);
}
if (rootDir) {
execArgs.push('-R', `${rootDir}`);
}
if (searchDir) {
execArgs.push('-s', `${searchDir}`);
}
if (verbose) {
execArgs.push('-v');
}
if (workingDir) {
options.cwd = workingDir;
}
if (writePath) {
execArgs.push('-q', `${writePath}`);
}
if (xcodeDerivedData) {
execArgs.push('-D', `${xcodeDerivedData}`);
}
if (xcodePackage) {
execArgs.push('-J', `${xcodePackage}`);
}
return {execArgs, options, filepath, failCi};
};
export default buildExec;

1884
src/codecov Normal file

File diff suppressed because it is too large Load Diff

51
src/index.ts Normal file
View File

@@ -0,0 +1,51 @@
const core = require('@actions/core');
const exec = require('@actions/exec');
const fs = require('fs');
import buildExec from './buildExec';
const codecovScript = fs.readFileSync(__dirname + '/codecov');
let failCi;
try {
const {execArgs, options, filepath, failCi} = buildExec();
fs.writeFile(filepath, codecovScript, (err) => {
if (err && failCi) {
throw err;
} else if (err) {
core.warning(`Codecov warning: ${err.message}`);
}
exec.exec('bash', execArgs, options)
.catch((err) => {
if (failCi) {
core.setFailed(
`Codecov failed with the following error: ${err.message}`,
);
} else {
core.warning(`Codecov warning: ${err.message}`);
}
})
.then(() => {
unlinkFile();
});
const unlinkFile = () => {
fs.unlink(filepath, (err) => {
if (err && failCi) {
throw err;
} else if (err) {
core.warning(`Codecov warning: ${err.message}`);
}
});
};
});
} catch (error) {
if (failCi) {
core.setFailed(`Codecov failed with the following error: ${error.message}`);
} else {
core.warning(`Codecov warning: ${error.message}`);
}
}

View File

@@ -1,11 +0,0 @@
import Index from "./index";
test('test uncovered if', () => {
const indexObj = new Index();
expect(indexObj.uncovered_if()).toEqual(false);
});
test('fully covered', () => {
const indexObj = new Index();
expect(indexObj.fully_covered()).toEqual(true);
});

5
tsconfig.json Normal file
View File

@@ -0,0 +1,5 @@
{
"include": [
"src"
]
}