Compare commits

..

46 Commits

Author SHA1 Message Date
Tom Hu
428cda1b1c feat: add plugins (#1099)
* feat: add plugins

* fix: add test
2023-09-22 17:29:50 -05:00
dependabot[bot]
572779f95b build(deps-dev): bump @typescript-eslint/parser from 6.7.0 to 6.7.2 (#1097)
Bumps [@typescript-eslint/parser](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/parser) from 6.7.0 to 6.7.2.
- [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases)
- [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/parser/CHANGELOG.md)
- [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v6.7.2/packages/parser)

---
updated-dependencies:
- dependency-name: "@typescript-eslint/parser"
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-09-21 12:26:09 -05:00
dependabot[bot]
d6353e1297 build(deps-dev): bump @types/node from 20.6.2 to 20.6.3 (#1098)
Bumps [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node) from 20.6.2 to 20.6.3.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node)

---
updated-dependencies:
- dependency-name: "@types/node"
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-09-21 12:22:43 -05:00
dependabot[bot]
d6b8a01e05 build(deps-dev): bump @typescript-eslint/eslint-plugin from 6.7.0 to 6.7.2 (#1095)
build(deps-dev): bump @typescript-eslint/eslint-plugin

Bumps [@typescript-eslint/eslint-plugin](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/eslint-plugin) from 6.7.0 to 6.7.2.
- [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases)
- [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/CHANGELOG.md)
- [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v6.7.2/packages/eslint-plugin)

---
updated-dependencies:
- dependency-name: "@typescript-eslint/eslint-plugin"
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-09-21 12:15:35 -05:00
dependabot[bot]
59959656dc build(deps): bump openpgp from 5.10.1 to 5.10.2 (#1096)
Bumps [openpgp](https://github.com/openpgpjs/openpgpjs) from 5.10.1 to 5.10.2.
- [Release notes](https://github.com/openpgpjs/openpgpjs/releases)
- [Commits](https://github.com/openpgpjs/openpgpjs/compare/v5.10.1...v5.10.2)

---
updated-dependencies:
- dependency-name: openpgp
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-09-21 12:15:21 -05:00
dependabot[bot]
3f71d3b255 build(deps-dev): bump @types/node from 20.6.0 to 20.6.2 (#1093)
Bumps [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node) from 20.6.0 to 20.6.2.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node)

---
updated-dependencies:
- dependency-name: "@types/node"
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-09-18 11:41:05 -07:00
dependabot[bot]
266a44bf8b build(deps): bump github/codeql-action from 2.21.5 to 2.21.7 (#1094)
Bumps [github/codeql-action](https://github.com/github/codeql-action) from 2.21.5 to 2.21.7.
- [Release notes](https://github.com/github/codeql-action/releases)
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md)
- [Commits](https://github.com/github/codeql-action/compare/v2.21.5...v2.21.7)

---
updated-dependencies:
- dependency-name: github/codeql-action
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-09-18 11:10:01 -07:00
dependabot[bot]
2409ca5030 build(deps-dev): bump @types/jest from 29.5.4 to 29.5.5 (#1092)
Bumps [@types/jest](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/jest) from 29.5.4 to 29.5.5.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/jest)

---
updated-dependencies:
- dependency-name: "@types/jest"
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-09-18 11:09:37 -07:00
dependabot[bot]
b65fbdcf97 build(deps-dev): bump jest from 29.6.4 to 29.7.0 (#1082)
Bumps [jest](https://github.com/jestjs/jest/tree/HEAD/packages/jest) from 29.6.4 to 29.7.0.
- [Release notes](https://github.com/jestjs/jest/releases)
- [Changelog](https://github.com/jestjs/jest/blob/main/CHANGELOG.md)
- [Commits](https://github.com/jestjs/jest/commits/v29.7.0/packages/jest)

---
updated-dependencies:
- dependency-name: jest
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-09-13 17:43:32 -07:00
Tom Hu
c4cf8a4f03 4.0.0-beta.2 (#1086) 2023-09-13 09:29:07 -07:00
Dana Yaish
845c445181 not adding -n if empty to do-upload command (#1085) 2023-09-13 19:20:12 +03:00
Tom Hu
0016507ac7 chore(release): 4.0.0-beta.1 (#1084)
* chore(release): 4.0.0-beta.1

* fix: typo
2023-09-13 08:58:26 -07:00
Dana Yaish
c9e4b73267 use cli instead of node uploader (#1068)
* use cli instead of node uploader

* changes based on review

* logging out run command
2023-09-13 11:39:47 +03:00
dependabot[bot]
c9e0f0b3cf build(deps-dev): bump eslint from 8.48.0 to 8.49.0 (#1076)
Bumps [eslint](https://github.com/eslint/eslint) from 8.48.0 to 8.49.0.
- [Release notes](https://github.com/eslint/eslint/releases)
- [Changelog](https://github.com/eslint/eslint/blob/main/CHANGELOG.md)
- [Commits](https://github.com/eslint/eslint/compare/v8.48.0...v8.49.0)

---
updated-dependencies:
- dependency-name: eslint
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-09-12 15:44:28 -07:00
dependabot[bot]
da8479a5b3 build(deps-dev): bump @typescript-eslint/parser from 6.6.0 to 6.7.0 (#1079)
Bumps [@typescript-eslint/parser](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/parser) from 6.6.0 to 6.7.0.
- [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases)
- [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/parser/CHANGELOG.md)
- [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v6.7.0/packages/parser)

---
updated-dependencies:
- dependency-name: "@typescript-eslint/parser"
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-09-12 15:44:11 -07:00
dependabot[bot]
8e29a53ea6 build(deps-dev): bump @types/node from 20.5.9 to 20.6.0 (#1075)
Bumps [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node) from 20.5.9 to 20.6.0.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node)

---
updated-dependencies:
- dependency-name: "@types/node"
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-09-12 11:23:11 -07:00
dependabot[bot]
162bda9838 build(deps): bump actions/upload-artifact from 3.1.2 to 3.1.3 (#1077)
Bumps [actions/upload-artifact](https://github.com/actions/upload-artifact) from 3.1.2 to 3.1.3.
- [Release notes](https://github.com/actions/upload-artifact/releases)
- [Commits](0b7f8abb15...a8a3f3ad30)

---
updated-dependencies:
- dependency-name: actions/upload-artifact
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-09-12 11:21:38 -07:00
dependabot[bot]
46acd9de81 build(deps): bump actions/checkout from 3.6.0 to 4.0.0 (#1078)
Bumps [actions/checkout](https://github.com/actions/checkout) from 3.6.0 to 4.0.0.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/checkout/compare/v3.6.0...v4.0.0)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-09-12 11:21:24 -07:00
dependabot[bot]
904bf5a031 build(deps-dev): bump @typescript-eslint/eslint-plugin from 6.6.0 to 6.7.0 (#1080)
build(deps-dev): bump @typescript-eslint/eslint-plugin

Bumps [@typescript-eslint/eslint-plugin](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/eslint-plugin) from 6.6.0 to 6.7.0.
- [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases)
- [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/CHANGELOG.md)
- [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v6.7.0/packages/eslint-plugin)

---
updated-dependencies:
- dependency-name: "@typescript-eslint/eslint-plugin"
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-09-12 11:20:31 -07:00
dependabot[bot]
267c1ae7ba build(deps): bump @actions/core from 1.10.0 to 1.10.1 (#1081)
Bumps [@actions/core](https://github.com/actions/toolkit/tree/HEAD/packages/core) from 1.10.0 to 1.10.1.
- [Changelog](https://github.com/actions/toolkit/blob/main/packages/core/RELEASES.md)
- [Commits](https://github.com/actions/toolkit/commits/HEAD/packages/core)

---
updated-dependencies:
- dependency-name: "@actions/core"
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-09-12 11:20:19 -07:00
dependabot[bot]
398b9de041 build(deps-dev): bump @vercel/ncc from 0.36.1 to 0.38.0 (#1074)
Bumps [@vercel/ncc](https://github.com/vercel/ncc) from 0.36.1 to 0.38.0.
- [Release notes](https://github.com/vercel/ncc/releases)
- [Commits](https://github.com/vercel/ncc/compare/0.36.1...0.38.0)

---
updated-dependencies:
- dependency-name: "@vercel/ncc"
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-09-07 21:22:47 -07:00
dependabot[bot]
a08d532ca1 build(deps-dev): bump @typescript-eslint/parser from 6.5.0 to 6.6.0 (#1071)
Bumps [@typescript-eslint/parser](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/parser) from 6.5.0 to 6.6.0.
- [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases)
- [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/parser/CHANGELOG.md)
- [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v6.6.0/packages/parser)

---
updated-dependencies:
- dependency-name: "@typescript-eslint/parser"
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-09-06 12:29:50 -07:00
Tom Hu
db68c7a205 Update README.md (#1073) 2023-09-06 11:12:44 -07:00
dependabot[bot]
7811627418 build(deps-dev): bump @typescript-eslint/eslint-plugin from 6.5.0 to 6.6.0 (#1072)
build(deps-dev): bump @typescript-eslint/eslint-plugin

Bumps [@typescript-eslint/eslint-plugin](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/eslint-plugin) from 6.5.0 to 6.6.0.
- [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases)
- [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/CHANGELOG.md)
- [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v6.6.0/packages/eslint-plugin)

---
updated-dependencies:
- dependency-name: "@typescript-eslint/eslint-plugin"
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-09-05 18:23:37 -07:00
dependabot[bot]
c3a18848b8 build(deps): bump github/codeql-action from 2.21.4 to 2.21.5 (#1069)
Bumps [github/codeql-action](https://github.com/github/codeql-action) from 2.21.4 to 2.21.5.
- [Release notes](https://github.com/github/codeql-action/releases)
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md)
- [Commits](https://github.com/github/codeql-action/compare/v2.21.4...v2.21.5)

---
updated-dependencies:
- dependency-name: github/codeql-action
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-09-05 18:16:47 -07:00
dependabot[bot]
36dbb833d4 build(deps-dev): bump @types/node from 20.5.7 to 20.5.9 (#1070)
Bumps [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node) from 20.5.7 to 20.5.9.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node)

---
updated-dependencies:
- dependency-name: "@types/node"
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-09-05 18:16:26 -07:00
dependabot[bot]
04adcebd9b build(deps): bump openpgp from 5.9.0 to 5.10.1 (#1066)
Bumps [openpgp](https://github.com/openpgpjs/openpgpjs) from 5.9.0 to 5.10.1.
- [Release notes](https://github.com/openpgpjs/openpgpjs/releases)
- [Commits](https://github.com/openpgpjs/openpgpjs/compare/v5.9.0...v5.10.1)

---
updated-dependencies:
- dependency-name: openpgp
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-08-29 11:15:05 -07:00
dependabot[bot]
836e505c14 build(deps-dev): bump @types/node from 20.5.6 to 20.5.7 (#1062)
Bumps [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node) from 20.5.6 to 20.5.7.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node)

---
updated-dependencies:
- dependency-name: "@types/node"
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-08-29 11:14:32 -07:00
dependabot[bot]
3d80684171 build(deps-dev): bump eslint from 8.47.0 to 8.48.0 (#1061)
Bumps [eslint](https://github.com/eslint/eslint) from 8.47.0 to 8.48.0.
- [Release notes](https://github.com/eslint/eslint/releases)
- [Changelog](https://github.com/eslint/eslint/blob/main/CHANGELOG.md)
- [Commits](https://github.com/eslint/eslint/compare/v8.47.0...v8.48.0)

---
updated-dependencies:
- dependency-name: eslint
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-08-29 11:14:17 -07:00
dependabot[bot]
0a6ec24b18 build(deps): bump actions/checkout from 3.5.3 to 3.6.0 (#1063)
Bumps [actions/checkout](https://github.com/actions/checkout) from 3.5.3 to 3.6.0.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/checkout/compare/v3.5.3...v3.6.0)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-08-29 10:04:31 -07:00
dependabot[bot]
f257191299 build(deps-dev): bump @typescript-eslint/eslint-plugin from 6.4.1 to 6.5.0 (#1064)
build(deps-dev): bump @typescript-eslint/eslint-plugin

Bumps [@typescript-eslint/eslint-plugin](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/eslint-plugin) from 6.4.1 to 6.5.0.
- [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases)
- [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/CHANGELOG.md)
- [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v6.5.0/packages/eslint-plugin)

---
updated-dependencies:
- dependency-name: "@typescript-eslint/eslint-plugin"
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-08-29 10:03:26 -07:00
dependabot[bot]
030fc6b0c7 build(deps-dev): bump @typescript-eslint/parser from 6.4.1 to 6.5.0 (#1065)
Bumps [@typescript-eslint/parser](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/parser) from 6.4.1 to 6.5.0.
- [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases)
- [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/parser/CHANGELOG.md)
- [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v6.5.0/packages/parser)

---
updated-dependencies:
- dependency-name: "@typescript-eslint/parser"
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-08-29 07:40:41 -07:00
dependabot[bot]
6991c70c83 build(deps-dev): bump @types/node from 20.5.4 to 20.5.6 (#1060)
Bumps [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node) from 20.5.4 to 20.5.6.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node)

---
updated-dependencies:
- dependency-name: "@types/node"
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-08-25 09:50:24 -07:00
Tom Hu
2b88a0bb95 chore(deps): update outdated deps (#1059) 2023-08-25 09:11:22 -07:00
dependabot[bot]
de1b515b0f build(deps-dev): bump @types/node from 20.5.3 to 20.5.4 (#1058)
Bumps [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node) from 20.5.3 to 20.5.4.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node)

---
updated-dependencies:
- dependency-name: "@types/node"
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-08-24 11:43:05 -07:00
dependabot[bot]
8a36907d84 build(deps): bump github/codeql-action from 2.21.2 to 2.21.4 (#1051)
Bumps [github/codeql-action](https://github.com/github/codeql-action) from 2.21.2 to 2.21.4.
- [Release notes](https://github.com/github/codeql-action/releases)
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md)
- [Commits](https://github.com/github/codeql-action/compare/v2.21.2...v2.21.4)

---
updated-dependencies:
- dependency-name: github/codeql-action
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-08-24 11:42:35 -07:00
dependabot[bot]
8ccb892add build(deps-dev): bump @types/node from 20.4.5 to 20.5.3 (#1055)
Bumps [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node) from 20.4.5 to 20.5.3.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node)

---
updated-dependencies:
- dependency-name: "@types/node"
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-08-23 10:31:55 -07:00
Dana Yaish
c17956f54f build commit,report and upload args based on codecovcli (#943)
* build commit,report and upload args based on codecovcli

* add tests

* Empty-Commit
2023-08-22 14:03:18 -07:00
dependabot[bot]
e1dd05cde2 build(deps): bump github/codeql-action from 1.0.26 to 2.21.2 (#1033)
Bumps [github/codeql-action](https://github.com/github/codeql-action) from 1.0.26 to 2.21.2.
- [Release notes](https://github.com/github/codeql-action/releases)
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md)
- [Commits](https://github.com/github/codeql-action/compare/v1.0.26...v2.21.2)

---
updated-dependencies:
- dependency-name: github/codeql-action
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-08-01 08:36:55 -07:00
dependabot[bot]
8f4394ce71 build(deps-dev): bump @types/node from 20.1.4 to 20.4.5 (#1032)
Bumps [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node) from 20.1.4 to 20.4.5.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node)

---
updated-dependencies:
- dependency-name: "@types/node"
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-08-01 08:36:22 -07:00
dependabot[bot]
5f0db07700 build(deps): bump node-fetch from 3.3.1 to 3.3.2 (#1031)
Bumps [node-fetch](https://github.com/node-fetch/node-fetch) from 3.3.1 to 3.3.2.
- [Release notes](https://github.com/node-fetch/node-fetch/releases)
- [Commits](https://github.com/node-fetch/node-fetch/compare/v3.3.1...v3.3.2)

---
updated-dependencies:
- dependency-name: node-fetch
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-08-01 08:35:59 -07:00
dependabot[bot]
c47ccb92bf build(deps-dev): bump word-wrap from 1.2.3 to 1.2.4 (#1024)
Bumps [word-wrap](https://github.com/jonschlinkert/word-wrap) from 1.2.3 to 1.2.4.
- [Release notes](https://github.com/jonschlinkert/word-wrap/releases)
- [Commits](https://github.com/jonschlinkert/word-wrap/compare/1.2.3...1.2.4)

---
updated-dependencies:
- dependency-name: word-wrap
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-08-01 08:34:45 -07:00
dependabot[bot]
223b2a5870 build(deps): bump tough-cookie from 4.0.0 to 4.1.3 (#1013)
Bumps [tough-cookie](https://github.com/salesforce/tough-cookie) from 4.0.0 to 4.1.3.
- [Release notes](https://github.com/salesforce/tough-cookie/releases)
- [Changelog](https://github.com/salesforce/tough-cookie/blob/master/CHANGELOG.md)
- [Commits](https://github.com/salesforce/tough-cookie/compare/v4.0.0...v4.1.3)

---
updated-dependencies:
- dependency-name: tough-cookie
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-08-01 08:33:38 -07:00
dependabot[bot]
dc7955ad4d build(deps): bump ossf/scorecard-action from 2.1.3 to 2.2.0 (#1006)
Bumps [ossf/scorecard-action](https://github.com/ossf/scorecard-action) from 2.1.3 to 2.2.0.
- [Release notes](https://github.com/ossf/scorecard-action/releases)
- [Changelog](https://github.com/ossf/scorecard-action/blob/main/RELEASE.md)
- [Commits](80e868c13c...08b4669551)

---
updated-dependencies:
- dependency-name: ossf/scorecard-action
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-08-01 08:32:51 -07:00
dependabot[bot]
5b168f78a6 build(deps): bump actions/checkout from 3.0.0 to 3.5.3 (#1000)
Bumps [actions/checkout](https://github.com/actions/checkout) from 3.0.0 to 3.5.3.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/checkout/compare/v3...v3.5.3)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-08-01 08:29:50 -07:00
dependabot[bot]
6a48e74ab1 build(deps): bump openpgp from 5.8.0 to 5.9.0 (#985)
Bumps [openpgp](https://github.com/openpgpjs/openpgpjs) from 5.8.0 to 5.9.0.
- [Release notes](https://github.com/openpgpjs/openpgpjs/releases)
- [Commits](https://github.com/openpgpjs/openpgpjs/compare/v5.8.0...v5.9.0)

---
updated-dependencies:
- dependency-name: openpgp
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-08-01 08:25:23 -07:00
15 changed files with 3628 additions and 8311 deletions

View File

@@ -37,11 +37,11 @@ jobs:
steps:
- name: Checkout repository
uses: actions/checkout@v3
uses: actions/checkout@v4.0.0
# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v2
uses: github/codeql-action/init@v2.21.7
with:
languages: ${{ matrix.language }}
# If you wish to specify custom queries, you can do so here or in a config file.
@@ -52,7 +52,7 @@ jobs:
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
# If this step fails, then you should remove it and run the build manually (see below)
- name: Autobuild
uses: github/codeql-action/autobuild@v2
uses: github/codeql-action/autobuild@v2.21.7
# Command-line programs to run using the OS shell.
# 📚 https://git.io/JvXDl
@@ -66,4 +66,4 @@ jobs:
# make release
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v2
uses: github/codeql-action/analyze@v2.21.7

View File

@@ -8,7 +8,7 @@ jobs:
os: [macos-latest, windows-latest, ubuntu-latest]
steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4.0.0
- name: Upload coverage to Codecov (script)
uses: ./
with:
@@ -16,6 +16,7 @@ jobs:
flags: script,${{ matrix.os }}
name: codecov-script
verbose: true
token: ${{ secrets.CODECOV_TOKEN }}
- name: Upload coverage to Codecov (demo)
uses: ./
with:
@@ -24,6 +25,7 @@ jobs:
flags: demo,${{ matrix.os }}
name: codecov-demo
verbose: true
token: ${{ secrets.CODECOV_TOKEN }}
- name: Upload coverage to Codecov (version)
uses: ./
with:
@@ -31,8 +33,9 @@ jobs:
file: ./coverage/coverage-final.json
flags: version,${{ matrix.os }}
name: codecov-version
version: v0.1.0_8880
version: v0.2.0
verbose: true
token: ${{ secrets.CODECOV_TOKEN }}
run:
runs-on: ${{ matrix.os }}
strategy:
@@ -40,7 +43,7 @@ jobs:
os: [macos-latest, windows-latest, ubuntu-latest]
steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4.0.0
- name: Install dependencies
run: npm install
- name: Lint
@@ -54,6 +57,7 @@ jobs:
flags: script,${{ matrix.os }}
name: codecov-script
verbose: true
token: ${{ secrets.CODECOV_TOKEN }}
- name: Upload coverage to Codecov (demo)
uses: ./
with:
@@ -62,6 +66,7 @@ jobs:
flags: demo,${{ matrix.os }}
name: codecov-demo
verbose: true
token: ${{ secrets.CODECOV_TOKEN }}
- name: Upload coverage to Codecov (version)
uses: ./
with:
@@ -69,5 +74,6 @@ jobs:
file: ./coverage/coverage-final.json
flags: version,${{ matrix.os }}
name: codecov-version
version: v0.1.0_8880
version: v0.2.0
verbose: true
token: ${{ secrets.CODECOV_TOKEN }}

View File

@@ -24,12 +24,12 @@ jobs:
steps:
- name: "Checkout code"
uses: actions/checkout@a12a3943b4bdde767164f792f33f40b04645d846 # v3.0.0
uses: actions/checkout@v4.0.0 # v3.0.0
with:
persist-credentials: false
- name: "Run analysis"
uses: ossf/scorecard-action@80e868c13c90f172d68d1f4501dee99e2479f7af # v2.1.3
uses: ossf/scorecard-action@08b4669551908b1024bb425080c797723083c031 # v2.2.0
with:
results_file: results.sarif
results_format: sarif
@@ -48,7 +48,7 @@ jobs:
# Upload the results as artifacts (optional). Commenting out will disable uploads of run results in SARIF
# format to the repository Actions tab.
- name: "Upload artifact"
uses: actions/upload-artifact@0b7f8abb1508181956e8e162db84b466c27e18ce # v3.1.2
uses: actions/upload-artifact@a8a3f3ad30e3422c9c7b888a15615d19a852ae32 # v3.1.3
with:
name: SARIF file
path: results.sarif
@@ -56,6 +56,6 @@ jobs:
# Upload the results to GitHub's code scanning dashboard.
- name: "Upload to code-scanning"
uses: github/codeql-action/upload-sarif@5f532563584d71fdef14ee64d17bafb34f751ce5 # v1.0.26
uses: github/codeql-action/upload-sarif@v2.21.7 # v1.0.26
with:
sarif_file: results.sarif

View File

@@ -1,3 +1,16 @@
## 4.0.0-beta.2
### Fixes
- #1085 not adding -n if empty to do-upload command
## 4.0.0-beta.1
`v4` represents a move from the [universal uploader](https://github.com/codecov/uploader) to the [Codecov CLI](https://github.com/codecov/codecov-cli). Although this will unlock new features for our users, the CLI is not yet at feature parity with the universal uploader.
### Breaking Changes
- No current support for `aarch64` and `alpine` architectures.
- Tokenless uploading is unsuported
- Various arguments to the Action have been removed
## 3.1.4
### Fixes
- #967 Fix typo in README.md

View File

@@ -5,7 +5,15 @@
[![Workflow for Codecov Action](https://github.com/codecov/codecov-action/actions/workflows/main.yml/badge.svg)](https://github.com/codecov/codecov-action/actions/workflows/main.yml)
### Easily upload coverage reports to Codecov from GitHub Actions
>The latest release of this Action adds support for tokenless uploads from GitHub Actions!
## v4 Beta Release
`v4` of the Codecov GitHub Action will use the [Codecov CLI](https://github.com/codecov/codecov-cli) to upload coverage reports to Codecov. Currently, `v4` is in beta.
Breaking Changes
- No current support for `aarch64` and `alpine` architectures.
- Tokenless uploading is unsupported
- Various arguments to the Action have been removed
`v3` versions and below will not have access to CLI features (e.g. global upload token).
## ⚠️ Deprecation of v1
**As of February 1, 2022, v1 has been fully sunset and no longer functions**
@@ -16,12 +24,6 @@ more about our deprecation plan and the new uploader on our [blog](https://about
We will be restricting any updates to the `v1` Action to security updates and hotfixes.
### Migration from `v1` to `v3`
The `v3` uploader has a few breaking changes for users
- Multiple fields have not been transferred from the bash uploader or have been deprecated. Notably
many of the `functionalities` and `gcov_` arguments have been removed. Please check the documentation
below for the full list.
## Usage
To integrate Codecov with your Actions pipeline, specify the name of this repository with a tag number (`@v3` is recommended) as a `step` within your `workflow.yml` file.

View File

@@ -17,12 +17,6 @@ inputs:
flags:
description: 'Flag upload to group coverage metrics (e.g. unittests | integration | ui,chrome)'
required: false
full_report:
description: Specify the path of a full Codecov report to re-upload
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
dry_run:
description: "Don't upload files to Codecov"
required: false
@@ -32,38 +26,14 @@ inputs:
fail_ci_if_error:
description: 'Specify whether or not CI build should fail if Codecov runs into an error during upload'
required: false
functionalities:
description: 'Comma-separated list, see the README for options and their usage. Options include `network`, `fixes`, `search`.'
required: false
gcov:
description: 'Run with gcov support'
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_ignore:
description: 'Paths to ignore during gcov gathering'
required: false
gcov_include:
description: 'Paths to include during gcov gathering'
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: 'Specify a filter on the files listed in the network section of the Codecov report. Useful for upload-specific path fixing'
required: false
network_prefix:
description: 'Specify a prefix on files listed in the network section of the Codecov report. Useful to help resolve path fixing'
required: false
os:
description: 'Override the assumed OS. Options are aarch64 | alpine | linux | macos | windows.'
description: 'Override the assumed OS. Options are linux | macos | windows.'
required: false
override_branch:
description: 'Specify the branch name'
@@ -77,8 +47,8 @@ inputs:
override_pr:
description: 'Specify the pull request number'
required: false
override_tag:
description: 'Specify the git tag'
plugins:
description: 'Comma-separated list of plugins for use during upload.'
required: false
root_dir:
description: 'Used when not in git/hg project to identify project root directory'
@@ -86,36 +56,15 @@ inputs:
slug:
description: 'Specify the slug manually (Enterprise use)'
required: false
swift:
description: 'Run with swift coverage support'
required: false
swift_project:
description: 'Specify the swift project to speed up coverage conversion'
required: false
upstream_proxy:
description: 'The upstream http proxy server to connect through'
required: false
url:
description: 'Change the upload host (Enterprise use)'
required: false
verbose:
description: 'Specify whether the Codecov output should be verbose'
required: false
version:
description: 'Specify which version of the Codecov Uploader should be used. Defaults to `latest`'
description: 'Specify which version of the Codecov CLI should be used. Defaults to `latest`'
required: false
working-directory:
description: 'Directory in which to execute codecov.sh'
required: false
xcode:
description: 'Run with xcode support'
required: false
xcode_archive_path:
description: 'Specify the xcode archive path. Likely specified as the -resultBundlePath and should end in .xcresult'
required: false
xtra_args:
description: 'Add additional uploader args that may be missing in the Action'
required: false
branding:
color: 'red'
icon: 'umbrella'

301
dist/index.js vendored

File diff suppressed because one or more lines are too long

2
dist/index.js.map vendored

File diff suppressed because one or more lines are too long

10785
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@@ -1,6 +1,6 @@
{
"name": "codecov-action",
"version": "3.1.6",
"version": "4.0.0-beta.3",
"description": "Upload coverage reports to Codecov from GitHub Actions",
"main": "index.js",
"scripts": {
@@ -23,23 +23,23 @@
},
"homepage": "https://github.com/codecov/codecov-action#readme",
"dependencies": {
"@actions/core": "^1.10.0",
"@actions/core": "^1.10.1",
"@actions/exec": "^1.1.1",
"@actions/github": "^5.1.1",
"node-fetch": "^3.3.1",
"openpgp": "5.8"
"node-fetch": "^3.3.2",
"openpgp": "5.10"
},
"devDependencies": {
"@types/jest": "^27.5.0",
"@types/node": "^20.1.4",
"@typescript-eslint/eslint-plugin": "^4.29.2",
"@typescript-eslint/parser": "^4.29.2",
"@vercel/ncc": "^0.36.1",
"eslint": "^7.32.0",
"@types/jest": "^29.5.5",
"@types/node": "^20.6.3",
"@typescript-eslint/eslint-plugin": "^6.7.2",
"@typescript-eslint/parser": "^6.7.2",
"@vercel/ncc": "^0.38.0",
"eslint": "^8.49.0",
"eslint-config-google": "^0.14.0",
"jest": "^26.6.3",
"jest": "^29.7.0",
"jest-junit": "^16.0.0",
"ts-jest": "^26.5.6",
"typescript": "^4.9.5"
"ts-jest": "^29.1.1",
"typescript": "^5.2.0"
}
}

View File

@@ -1,31 +1,55 @@
import * as github from '@actions/github';
import buildExec from './buildExec';
import {
buildCommitExec,
buildGeneralExec,
buildReportExec,
buildUploadExec,
} from './buildExec';
/* eslint-disable @typescript-eslint/no-var-requires */
const {version} = require('../package.json');
const context = github.context;
test('no arguments', () => {
const {execArgs, failCi} = buildExec();
const args = [
'-n',
'',
'-Q',
`github-action-${version}`,
];
if (context.eventName == 'pull_request') {
args.push('-C', `${context.payload.pull_request.head.sha}`);
test('general args', () => {
const envs = {
url: 'https://codecov.enterprise.com',
verbose: 't',
};
for (const env of Object.keys(envs)) {
process.env['INPUT_' + env.toUpperCase()] = envs[env];
}
const {args, verbose} = buildGeneralExec();
expect(args).toEqual(
expect.arrayContaining([
'--enterprise-url',
'https://codecov.enterprise.com',
'-v',
]));
expect(verbose).toBeTruthy();
for (const env of Object.keys(envs)) {
delete process.env['INPUT_' + env.toUpperCase()];
}
expect(execArgs).toEqual(args);
expect(failCi).toBeFalsy();
});
test('all arguments', () => {
test('upload args using context', () => {
const expectedArgs = [];
const {uploadExecArgs, uploadCommand} = buildUploadExec();
if (context.eventName == 'pull_request') {
expectedArgs.push('-C', `${context.payload.pull_request.head.sha}`);
}
if (context.eventName == 'pull_request_target') {
expectedArgs.push('-P', `${context.payload.number}`);
}
expect(uploadExecArgs).toEqual(expectedArgs);
expect(uploadCommand).toEqual('do-upload');
});
test('upload args', () => {
const envs = {
'commit_parent': '83231650328f11695dfb754ca0f540516f188d27',
'directory': 'coverage/',
'dry_run': 'true',
'env_vars': 'OS,PYTHON',
@@ -33,53 +57,30 @@ test('all arguments', () => {
'file': 'coverage.xml',
'files': 'dir1/coverage.xml,dir2/coverage.xml',
'flags': 'test,test2',
'functionalities': 'network',
'full_report': 'oldDir/oldReport.json',
'gcov': 'true',
'gcov_args': '-v',
'gcov_ignore': '*.fake',
'gcov_include': 'real_file',
'gcov_executable': 'gcov2',
'move_coverage_to_trash': 'true',
'name': 'codecov',
'network_filter': 'src/',
'network_prefix': 'build/',
'override_branch': 'thomasrockhu/test',
'override_build': '1',
'override_commit': '9caabca5474b49de74ef5667deabaf74cdacc244',
'override_pr': '2',
'override_tag': 'v1.2',
'plugins': 'pycoverage,compress-pycoverage',
'root_dir': 'root/',
'swift': 'true',
'swift_project': 'MyApp',
'slug': 'fakeOwner/fakeRepo',
'token': 'd3859757-ab80-4664-924d-aef22fa7557b',
'upstream_proxy': 'https://codecov.example.com',
'url': 'https://codecov.enterprise.com',
'verbose': 't',
'xcode': 'true',
'xcode_archive_path': '/test.xcresult',
'xtra_args': '--some --other --args',
'working-directory': 'src',
'plugin': 'xcode',
'exclude': 'src',
};
for (const env of Object.keys(envs)) {
process.env['INPUT_' + env.toUpperCase()] = envs[env];
}
const {execArgs, failCi} = buildExec();
expect(execArgs).toEqual([
const {uploadExecArgs, uploadCommand} = buildUploadExec();
const expectedArgs = [
'-n',
'codecov',
'-Q',
`github-action-${version}`,
'-c',
'-N',
'83231650328f11695dfb754ca0f540516f188d27',
'-d',
'-e',
'OS,PYTHON',
'-X',
'network',
'-Z',
'-f',
'coverage.xml',
@@ -87,25 +88,10 @@ test('all arguments', () => {
'dir1/coverage.xml',
'-f',
'dir2/coverage.xml',
'--full',
'oldDir/oldReport.json',
'-F',
'test',
'-F',
'test2',
'-g',
'--ga',
'-v',
'--gi',
'*.fake',
'--gI',
'real_file',
'--gx',
'gcov2',
'-i',
'src/',
'-k',
'build/',
'-B',
'thomasrockhu/test',
'-b',
@@ -114,111 +100,123 @@ test('all arguments', () => {
'9caabca5474b49de74ef5667deabaf74cdacc244',
'-P',
'2',
'-T',
'v1.2',
'-R',
'--plugin',
'pycoverage',
'--plugin',
'compress-pycoverage',
'--network-root-folder',
'root/',
'-s',
'coverage/',
'-r',
'fakeOwner/fakeRepo',
'--xs',
'--xsp',
'MyApp',
'-U',
'https://codecov.example.com',
'-u',
'https://codecov.enterprise.com',
'-v',
'--xc',
'--xp',
'/test.xcresult',
'--some --other --args',
]);
expect(failCi).toBeTruthy();
'--plugin',
'xcode',
'--exclude',
'src',
];
expect(uploadExecArgs).toEqual(expectedArgs);
expect(uploadCommand).toEqual('do-upload');
for (const env of Object.keys(envs)) {
delete process.env['INPUT_' + env.toUpperCase()];
}
});
describe('trim arguments after splitting them', () => {
const baseExpectation = [
'-n',
expect.stringContaining(''),
'-Q',
expect.stringContaining('github-action'),
];
test('files', () => {
const envs = {'files': './client-coverage.txt, ./lcov.info'};
test('report args', () => {
const envs = {
override_commit: '9caabca5474b49de74ef5667deabaf74cdacc244',
slug: 'fakeOwner/fakeRepo',
token: 'd3859757-ab80-4664-924d-aef22fa7557b',
};
for (const env of Object.keys(envs)) {
process.env['INPUT_' + env.toUpperCase()] = envs[env];
}
for (const [name, value] of Object.entries(envs)) {
process.env['INPUT_' + name.toUpperCase()] = value;
}
const {reportExecArgs, reportCommand} = buildReportExec();
const {execArgs} = buildExec();
expect(execArgs).toEqual(
expect.arrayContaining([
...baseExpectation,
'-f',
'./client-coverage.txt',
'-f',
'./lcov.info',
]),
);
for (const env of Object.keys(envs)) {
delete process.env['INPUT_' + env.toUpperCase()];
}
});
test('flags', () => {
const envs = {'flags': 'ios, mobile'};
for (const [name, value] of Object.entries(envs)) {
process.env['INPUT_' + name.toUpperCase()] = value;
}
const {execArgs} = buildExec();
expect(execArgs).toEqual(
expect.arrayContaining([
...baseExpectation,
'-F',
'ios',
'-F',
'mobile',
]),
);
for (const env of Object.keys(envs)) {
delete process.env['INPUT_' + env.toUpperCase()];
}
});
test('functionalities', () => {
const envs = {'functionalities': 'network, gcov'};
for (const [name, value] of Object.entries(envs)) {
process.env['INPUT_' + name.toUpperCase()] = value;
}
const {execArgs} = buildExec();
expect(execArgs).toEqual(
expect.arrayContaining([
...baseExpectation,
'-X',
'network',
'-X',
'gcov',
]),
);
for (const env of Object.keys(envs)) {
delete process.env['INPUT_' + env.toUpperCase()];
}
});
expect(reportExecArgs).toEqual(
expect.arrayContaining([
'-C',
'9caabca5474b49de74ef5667deabaf74cdacc244',
'--slug',
'fakeOwner/fakeRepo',
]));
expect(reportCommand).toEqual('create-report');
for (const env of Object.keys(envs)) {
delete process.env['INPUT_' + env.toUpperCase()];
}
});
test('report args using context', () => {
const envs = {
token: 'd3859757-ab80-4664-924d-aef22fa7557b',
};
for (const env of Object.keys(envs)) {
process.env['INPUT_' + env.toUpperCase()] = envs[env];
}
const expectedArgs : string[] = [];
if (context.eventName == 'pull_request') {
expectedArgs.push('-C', `${context.payload.pull_request.head.sha}`);
}
const {reportExecArgs, reportCommand} = buildReportExec();
expect(reportExecArgs).toEqual(expectedArgs);
expect(reportCommand).toEqual('create-report');
for (const env of Object.keys(envs)) {
delete process.env['INPUT_' + env.toUpperCase()];
}
});
test('commit args', () => {
const envs = {
override_commit: '9caabca5474b49de74ef5667deabaf74cdacc244',
slug: 'fakeOwner/fakeRepo',
token: 'd3859757-ab80-4664-924d-aef22fa7557b',
override_branch: 'thomasrockhu/test',
override_pr: '2',
commit_parent: '83231650328f11695dfb754ca0f540516f188d27',
};
for (const env of Object.keys(envs)) {
process.env['INPUT_' + env.toUpperCase()] = envs[env];
}
const {commitExecArgs, commitCommand} = buildCommitExec();
expect(commitExecArgs).toEqual(
expect.arrayContaining([
'-C',
'9caabca5474b49de74ef5667deabaf74cdacc244',
'--slug',
'fakeOwner/fakeRepo',
'-B',
'thomasrockhu/test',
'--pr',
'2',
'--parent-sha',
'83231650328f11695dfb754ca0f540516f188d27',
]));
expect(commitCommand).toEqual('create-commit');
for (const env of Object.keys(envs)) {
delete process.env['INPUT_' + env.toUpperCase()];
}
});
test('commit args using context', () => {
const expectedArgs :string[] = [];
const {commitExecArgs, commitCommand} = buildCommitExec();
if (context.eventName == 'pull_request') {
expectedArgs.push('-C', `${context.payload.pull_request.head.sha}`);
}
if (context.eventName == 'pull_request_target') {
expectedArgs.push('-P', `${context.payload.number}`);
}
expect(commitExecArgs).toEqual(expectedArgs);
expect(commitCommand).toEqual('create-commit');
});

View File

@@ -1,7 +1,8 @@
/* eslint-disable @typescript-eslint/no-explicit-any */
import * as core from '@actions/core';
import * as github from '@actions/github';
import {version} from '../package.json';
const context = github.context;
@@ -16,56 +17,142 @@ const isTrue = (variable) => {
);
};
const buildExec = () => {
const clean = core.getInput('move_coverage_to_trash');
const buildCommitExec = () => {
const commitParent = core.getInput('commit_parent');
const dryRun = isTrue(core.getInput('dry_run'));
const overrideBranch = core.getInput('override_branch');
const overrideCommit = core.getInput('override_commit');
const overridePr = core.getInput('override_pr');
const slug = core.getInput('slug');
const token = core.getInput('token');
const commitCommand = 'create-commit';
const commitExecArgs = [];
const commitOptions:any = {};
commitOptions.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) {
commitOptions.env.CODECOV_TOKEN = token;
}
if (commitParent) {
commitExecArgs.push('--parent-sha', `${commitParent}`);
}
if (overrideBranch) {
commitExecArgs.push('-B', `${overrideBranch}`);
}
if (overrideCommit) {
commitExecArgs.push('-C', `${overrideCommit}`);
} else if (
`${context.eventName}` == 'pull_request' ||
`${context.eventName}` == 'pull_request_target'
) {
commitExecArgs.push('-C', `${context.payload.pull_request.head.sha}`);
}
if (overridePr) {
commitExecArgs.push('--pr', `${overridePr}`);
} else if (
`${context.eventName}` == 'pull_request_target'
) {
commitExecArgs.push('--pr', `${context.payload.number}`);
}
if (slug) {
commitExecArgs.push('--slug', `${slug}`);
}
return {commitExecArgs, commitOptions, commitCommand};
};
const buildGeneralExec = () => {
const url = core.getInput('url');
const verbose = isTrue(core.getInput('verbose'));
const args = [];
if (url) {
args.push('--enterprise-url', `${url}`);
}
if (verbose) {
args.push('-v');
}
return {args, verbose};
};
const buildReportExec = () => {
const overrideCommit = core.getInput('override_commit');
const slug = core.getInput('slug');
const token = core.getInput('token');
const reportCommand = 'create-report';
const reportExecArgs = [];
const reportOptions:any = {};
reportOptions.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) {
reportOptions.env.CODECOV_TOKEN = token;
}
if (overrideCommit) {
reportExecArgs.push('-C', `${overrideCommit}`);
} else if (
`${context.eventName}` == 'pull_request' ||
`${context.eventName}` == 'pull_request_target'
) {
reportExecArgs.push('-C', `${context.payload.pull_request.head.sha}`);
}
if (slug) {
reportExecArgs.push('--slug', `${slug}`);
}
return {reportExecArgs, reportOptions, reportCommand};
};
const buildUploadExec = () => {
const envVars = core.getInput('env_vars');
const dryRun = isTrue(core.getInput('dry_run'));
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 fullReport = core.getInput('full_report');
const functionalities = core.getInput('functionalities');
const gcov = core.getInput('gcov');
const gcovArgs = core.getInput('gcov_args');
const gcovExecutable = core.getInput('gcov_executable');
const gcovIgnore = core.getInput('gcov_ignore');
const gcovInclude = core.getInput('gcov_include');
const name = core.getInput('name');
const networkFilter = core.getInput('network_filter');
const networkPrefix = core.getInput('network_prefix');
const os = core.getInput('os');
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 plugins = core.getInput('plugins');
const rootDir = core.getInput('root_dir');
const searchDir = core.getInput('directory');
const slug = core.getInput('slug');
const swift = core.getInput('swift');
const swiftProject = core.getInput('swift_project');
const token = core.getInput('token');
const upstream = core.getInput('upstream_proxy');
const url = core.getInput('url');
const verbose = isTrue(core.getInput('verbose'));
const workingDir = core.getInput('working-directory');
const xcode = core.getInput('xcode');
const xcodeArchivePath = core.getInput('xcode_archive_path');
const xtraArgs = core.getInput('xtra_args');
let uploaderVersion = core.getInput('version');
const workingDir = core.getInput('working-directory');
const plugin = core.getInput('plugin');
const exclude = core.getInput('exclude');
const execArgs = [];
execArgs.push(
'-n',
`${name}`,
'-Q',
`github-action-${version}`,
);
const options:any = {};
options.env = Object.assign(process.env, {
const uploadExecArgs = [];
const uploadCommand = 'do-upload';
const uploadOptions:any = {};
uploadOptions.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,
@@ -78,144 +165,104 @@ const buildExec = () => {
for (const envVar of envVars.split(',')) {
const envVarClean = envVar.trim();
if (envVarClean) {
options.env[envVarClean] = process.env[envVarClean];
uploadOptions.env[envVarClean] = process.env[envVarClean];
envVarsArg.push(envVarClean);
}
}
if (name) {
uploadExecArgs.push(
'-n',
`${name}`,
);
}
if (token) {
options.env.CODECOV_TOKEN = token;
}
if (clean) {
execArgs.push('-c');
}
if (commitParent) {
execArgs.push('-N', `${commitParent}`);
uploadOptions.env.CODECOV_TOKEN = token;
}
if (dryRun) {
execArgs.push('-d');
uploadExecArgs.push('-d');
}
if (envVarsArg.length) {
execArgs.push('-e', envVarsArg.join(','));
}
if (functionalities) {
functionalities.split(',').map((f) => f.trim()).forEach((f) => {
execArgs.push('-X', `${f}`);
});
uploadExecArgs.push('-e', envVarsArg.join(','));
}
if (failCi) {
execArgs.push('-Z');
uploadExecArgs.push('-Z');
}
if (file) {
execArgs.push('-f', `${file}`);
uploadExecArgs.push('-f', `${file}`);
}
if (files) {
files.split(',').map((f) => f.trim()).forEach((f) => {
execArgs.push('-f', `${f}`);
uploadExecArgs.push('-f', `${f}`);
});
}
if (fullReport) {
execArgs.push('--full', `${fullReport}`);
}
if (flags) {
flags.split(',').map((f) => f.trim()).forEach((f) => {
execArgs.push('-F', `${f}`);
uploadExecArgs.push('-F', `${f}`);
});
}
if (gcov) {
execArgs.push('-g');
}
if (gcovArgs) {
execArgs.push('--ga', `${gcovArgs}`);
}
if (gcovIgnore) {
execArgs.push('--gi', `${gcovIgnore}`);
}
if (gcovInclude) {
execArgs.push('--gI', `${gcovInclude}`);
}
if (gcovExecutable) {
execArgs.push('--gx', `${gcovExecutable}`);
}
if (networkFilter) {
execArgs.push('-i', `${networkFilter}`);
}
if (networkPrefix) {
execArgs.push('-k', `${networkPrefix}`);
}
if (overrideBranch) {
execArgs.push('-B', `${overrideBranch}`);
uploadExecArgs.push('-B', `${overrideBranch}`);
}
if (overrideBuild) {
execArgs.push('-b', `${overrideBuild}`);
uploadExecArgs.push('-b', `${overrideBuild}`);
}
if (overrideCommit) {
execArgs.push('-C', `${overrideCommit}`);
uploadExecArgs.push('-C', `${overrideCommit}`);
} else if (
`${context.eventName}` == 'pull_request' ||
`${context.eventName}` == 'pull_request_target'
) {
execArgs.push('-C', `${context.payload.pull_request.head.sha}`);
uploadExecArgs.push('-C', `${context.payload.pull_request.head.sha}`);
}
if (overridePr) {
execArgs.push('-P', `${overridePr}`);
uploadExecArgs.push('-P', `${overridePr}`);
} else if (
`${context.eventName}` == 'pull_request_target'
) {
execArgs.push('-P', `${context.payload.number}`);
uploadExecArgs.push('-P', `${context.payload.number}`);
}
if (overrideTag) {
execArgs.push('-T', `${overrideTag}`);
if (plugins) {
plugins.split(',').map((p) => p.trim()).forEach((p) => {
uploadExecArgs.push('--plugin', `${p}`);
});
}
if (rootDir) {
execArgs.push('-R', `${rootDir}`);
uploadExecArgs.push('--network-root-folder', `${rootDir}`);
}
if (searchDir) {
execArgs.push('-s', `${searchDir}`);
uploadExecArgs.push('-s', `${searchDir}`);
}
if (slug) {
execArgs.push('-r', `${slug}`);
uploadExecArgs.push('-r', `${slug}`);
}
if (swift) {
execArgs.push('--xs');
if (workingDir) {
uploadOptions.cwd = workingDir;
}
if (swift && swiftProject) {
execArgs.push('--xsp', `${swiftProject}`);
if (plugin) {
uploadExecArgs.push('--plugin', `${plugin}`);
}
if (upstream) {
execArgs.push('-U', `${upstream}`);
}
if (url) {
execArgs.push('-u', `${url}`);
}
if (verbose) {
execArgs.push('-v');
}
if (xcode && xcodeArchivePath) {
execArgs.push('--xc');
execArgs.push('--xp', `${xcodeArchivePath}`);
if (exclude) {
uploadExecArgs.push('--exclude', `${exclude}`);
}
if (uploaderVersion == '') {
uploaderVersion = 'latest';
}
if (verbose) {
console.debug({execArgs});
}
if (workingDir) {
options.cwd = workingDir;
}
if (xtraArgs) {
execArgs.push(`${xtraArgs}`);
}
return {execArgs, options, failCi, os, uploaderVersion, verbose};
return {
uploadExecArgs,
uploadOptions,
failCi,
os,
uploaderVersion,
uploadCommand,
};
};
export default buildExec;
export {
buildCommitExec,
buildGeneralExec,
buildReportExec,
buildUploadExec,
};

View File

@@ -4,6 +4,7 @@ import {
isValidPlatform,
isWindows,
PLATFORMS,
getCommand,
} from './helpers';
let OLDOS = process.env.RUNNER_OS;
@@ -39,34 +40,35 @@ test('getBaseUrl', () => {
expect(PLATFORMS.map((platform) => {
return getBaseUrl(platform, 'latest');
})).toEqual([
'https://uploader.codecov.io/latest/aarch64/codecov',
'https://uploader.codecov.io/latest/alpine/codecov',
'https://uploader.codecov.io/latest/linux/codecov',
'https://uploader.codecov.io/latest/macos/codecov',
'https://uploader.codecov.io/latest/windows/codecov.exe',
'https://cli.codecov.io/latest/linux/codecov',
'https://cli.codecov.io/latest/macos/codecov',
'https://cli.codecov.io/latest/windows/codecov.exe',
]);
expect(PLATFORMS.map((platform) => {
return getBaseUrl(platform, 'v0.1.0_8880');
})).toEqual([
'https://uploader.codecov.io/v0.1.0_8880/aarch64/codecov',
'https://uploader.codecov.io/v0.1.0_8880/alpine/codecov',
'https://uploader.codecov.io/v0.1.0_8880/linux/codecov',
'https://uploader.codecov.io/v0.1.0_8880/macos/codecov',
'https://uploader.codecov.io/v0.1.0_8880/windows/codecov.exe',
'https://cli.codecov.io/v0.1.0_8880/linux/codecov',
'https://cli.codecov.io/v0.1.0_8880/macos/codecov',
'https://cli.codecov.io/v0.1.0_8880/windows/codecov.exe',
]);
});
test('isWindows', () => {
expect(PLATFORMS.map((platform) => {
return isWindows(platform);
})).toEqual([false, false, false, false, true]);
})).toEqual([false, false, true]);
});
test('isValidPlatform', () => {
expect(PLATFORMS.map((platform) => {
return isValidPlatform(platform);
})).toEqual([true, true, true, true, true]);
})).toEqual([true, true, true]);
expect(isValidPlatform('fakeos')).toBeFalsy();
});
test('getCommand', () => {
expect(getCommand('path', ['-v', '-x'], 'do-upload'))
.toEqual(['path', '-v', '-x', 'do-upload']);
});

View File

@@ -1,8 +1,6 @@
import * as core from '@actions/core';
const PLATFORMS = [
'aarch64',
'alpine',
'linux',
'macos',
'windows',
@@ -50,7 +48,17 @@ const getPlatform = (os?: string): string => {
};
const getBaseUrl = (platform: string, version: string): string => {
return `https://uploader.codecov.io/${version}/${platform}/${getUploaderName(platform)}`;
return `https://cli.codecov.io/${version}/${platform}/${getUploaderName(platform)}`;
};
const getCommand = (
filename: string,
generalArgs:string[],
command: string,
): string[] => {
const fullCommand = [filename, ...generalArgs, command];
core.info(`==> Running command '${fullCommand.join(' ')}'`);
return fullCommand;
};
export {
@@ -61,4 +69,5 @@ export {
isValidPlatform,
isWindows,
setFailure,
getCommand,
};

View File

@@ -4,12 +4,18 @@ import * as path from 'path';
import * as exec from '@actions/exec';
import buildExec from './buildExec';
import {
buildCommitExec,
buildGeneralExec,
buildReportExec,
buildUploadExec,
} from './buildExec';
import {
getBaseUrl,
getPlatform,
getUploaderName,
setFailure,
getCommand,
} from './helpers';
import verify from './validate';
@@ -18,7 +24,18 @@ import versionInfo from './version';
let failCi;
try {
const {execArgs, options, failCi, os, uploaderVersion, verbose} = buildExec();
const {commitExecArgs, commitOptions, commitCommand} = buildCommitExec();
const {reportExecArgs, reportOptions, reportCommand} = buildReportExec();
const {
uploadExecArgs,
uploadOptions,
failCi,
os,
uploaderVersion,
uploadCommand,
} = buildUploadExec();
const {args, verbose} = buildGeneralExec();
const platform = getPlatform(os);
const filename = path.join( __dirname, getUploaderName(platform));
@@ -49,14 +66,52 @@ try {
}
});
};
await exec.exec(filename, execArgs, options)
.catch((err) => {
const doUpload = async () => {
await exec.exec(getCommand(filename, args, uploadCommand).join(' '),
uploadExecArgs,
uploadOptions)
.catch((err) => {
setFailure(
`Codecov:
Failed to properly upload report: ${err.message}`,
failCi,
);
});
};
const createReport = async () => {
await exec.exec(
getCommand(filename, args, reportCommand).join(' '),
reportExecArgs,
reportOptions)
.then(async (exitCode) => {
if (exitCode == 0) {
await doUpload();
}
}).catch((err) => {
setFailure(
`Codecov:
Failed to properly create report: ${err.message}`,
failCi,
);
});
};
await exec.exec(
getCommand(
filename,
args,
commitCommand,
).join(' '),
commitExecArgs, commitOptions)
.then(async (exitCode) => {
if (exitCode == 0) {
await createReport();
}
unlink();
}).catch((err) => {
setFailure(
`Codecov: Failed to properly upload: ${err.message}`,
`Codecov: Failed to properly create commit: ${err.message}`,
failCi,
);
}).then(() => {
unlink();
});
});
});