Compare commits

..

57 Commits

Author SHA1 Message Date
Tom Hu
e3c560433a Merge pull request #689 from codecov/feat/gcov
Bump to node16 and small fixes
2022-04-05 09:24:20 -04:00
Tom Hu
174efc5984 Update package-lock.json 2022-04-05 09:12:59 -04:00
Tom Hu
6243a75ef3 bump to 3.0.0 2022-04-04 17:19:12 -04:00
Tom Hu
0d6466ff9c Bump to node16 2022-04-04 17:13:17 -04:00
Tom Hu
d4729eeb39 fetch.default 2022-04-04 17:10:55 -04:00
Tom Hu
351baf62fa fix: bash 2022-04-04 17:09:16 -04:00
Tom Hu
d8cf6802a8 Merge pull request #675 from codecov/dependabot/npm_and_yarn/openpgp-5.2.1
build(deps): bump openpgp from 5.1.0 to 5.2.1
2022-04-04 17:08:17 -04:00
Tom Hu
b775e9013c Merge pull request #676 from codecov/dependabot/npm_and_yarn/actions/exec-1.1.1
build(deps): bump @actions/exec from 1.1.0 to 1.1.1
2022-04-04 17:07:55 -04:00
Tom Hu
2ebc2f0f6f Merge pull request #682 from codecov/dependabot/npm_and_yarn/typescript-4.6.3
build(deps-dev): bump typescript from 4.5.5 to 4.6.3
2022-04-04 17:03:36 -04:00
Tom Hu
8e2ef2bfcc Merge pull request #681 from codecov/dependabot/npm_and_yarn/types/node-17.0.23
build(deps-dev): bump @types/node from 17.0.18 to 17.0.23
2022-04-04 17:03:23 -04:00
dependabot[bot]
5f458f03fe build(deps): bump openpgp from 5.1.0 to 5.2.1
Bumps [openpgp](https://github.com/openpgpjs/openpgpjs) from 5.1.0 to 5.2.1.
- [Release notes](https://github.com/openpgpjs/openpgpjs/releases)
- [Commits](https://github.com/openpgpjs/openpgpjs/compare/v5.1.0...v5.2.1)

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

Signed-off-by: dependabot[bot] <support@github.com>
2022-04-04 21:01:44 +00:00
dependabot[bot]
398eded4bc build(deps): bump @actions/exec from 1.1.0 to 1.1.1
Bumps [@actions/exec](https://github.com/actions/toolkit/tree/HEAD/packages/exec) from 1.1.0 to 1.1.1.
- [Release notes](https://github.com/actions/toolkit/releases)
- [Changelog](https://github.com/actions/toolkit/blob/main/packages/exec/RELEASES.md)
- [Commits](https://github.com/actions/toolkit/commits/@actions/tool-cache@1.1.1/packages/exec)

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

Signed-off-by: dependabot[bot] <support@github.com>
2022-04-04 21:01:41 +00:00
Tom Hu
9af8a2b3c9 Merge pull request #685 from codecov/dependabot/npm_and_yarn/actions/github-5.0.1
build(deps): bump @actions/github from 5.0.0 to 5.0.1
2022-04-04 17:00:52 -04:00
Tom Hu
57fe0bb86d Merge pull request #683 from codecov/dependabot/npm_and_yarn/minimist-1.2.6
build(deps): bump minimist from 1.2.5 to 1.2.6
2022-04-04 17:00:17 -04:00
dependabot[bot]
e0cb890d01 build(deps): bump @actions/github from 5.0.0 to 5.0.1
Bumps [@actions/github](https://github.com/actions/toolkit/tree/HEAD/packages/github) from 5.0.0 to 5.0.1.
- [Release notes](https://github.com/actions/toolkit/releases)
- [Changelog](https://github.com/actions/toolkit/blob/main/packages/github/RELEASES.md)
- [Commits](https://github.com/actions/toolkit/commits/HEAD/packages/github)

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

Signed-off-by: dependabot[bot] <support@github.com>
2022-04-04 20:57:09 +00:00
dependabot[bot]
36c973b6e9 build(deps-dev): bump @types/node from 17.0.18 to 17.0.23
Bumps [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node) from 17.0.18 to 17.0.23.
- [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>
2022-04-04 20:56:45 +00:00
dependabot[bot]
adc3ab95ef build(deps-dev): bump typescript from 4.5.5 to 4.6.3
Bumps [typescript](https://github.com/Microsoft/TypeScript) from 4.5.5 to 4.6.3.
- [Release notes](https://github.com/Microsoft/TypeScript/releases)
- [Commits](https://github.com/Microsoft/TypeScript/compare/v4.5.5...v4.6.3)

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

Signed-off-by: dependabot[bot] <support@github.com>
2022-04-04 20:56:39 +00:00
Tom Hu
184819f51c Merge pull request #673 from codecov/dependabot/npm_and_yarn/node-fetch-3.2.3
build(deps): bump node-fetch from 3.2.0 to 3.2.3
2022-04-04 16:56:32 -04:00
Tom Hu
351939570f Merge pull request #667 from codecov/dependabot/github_actions/actions/checkout-3
build(deps): bump actions/checkout from 2 to 3
2022-04-04 16:56:22 -04:00
Tom Hu
86baaaf3a3 Merge pull request #659 from codecov/dependabot/npm_and_yarn/types/jest-27.4.1
build(deps-dev): bump @types/jest from 27.4.0 to 27.4.1
2022-04-04 16:55:40 -04:00
Tom Hu
7ab2ce5d95 Merge pull request #652 from codecov/dependabot/npm_and_yarn/vercel/ncc-0.33.3
build(deps-dev): bump @vercel/ncc from 0.30.0 to 0.33.3
2022-04-04 16:55:29 -04:00
Tom Hu
c3d40623c9 Merge pull request #688 from codecov/feat/gcov
Incorporate `gcov` arguments for the Codecov uploader
2022-04-04 16:41:54 -04:00
Tom Hu
9e4b071621 Merge branch 'feat/gcov' of https://github.com/codecov/codecov-action into feat/gcov 2022-04-04 16:29:19 -04:00
Tom Hu
ac6033346c fix: small edits 2022-04-04 16:28:42 -04:00
Tom Hu
c76bf12730 Merge branch 'master' into feat/gcov 2022-04-04 16:16:33 -04:00
Tom Hu
f37520c6b0 feat: add gcov support 2022-04-04 16:14:50 -04:00
dependabot[bot]
f78e7e3295 build(deps): bump minimist from 1.2.5 to 1.2.6
Bumps [minimist](https://github.com/substack/minimist) from 1.2.5 to 1.2.6.
- [Release notes](https://github.com/substack/minimist/releases)
- [Commits](https://github.com/substack/minimist/compare/1.2.5...1.2.6)

---
updated-dependencies:
- dependency-name: minimist
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-03-27 02:59:04 +00:00
dependabot[bot]
8930ac6d38 build(deps): bump node-fetch from 3.2.0 to 3.2.3
Bumps [node-fetch](https://github.com/node-fetch/node-fetch) from 3.2.0 to 3.2.3.
- [Release notes](https://github.com/node-fetch/node-fetch/releases)
- [Commits](https://github.com/node-fetch/node-fetch/compare/v3.2.0...v3.2.3)

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

Signed-off-by: dependabot[bot] <support@github.com>
2022-03-14 04:02:49 +00:00
dependabot[bot]
ef0a21c8b8 build(deps): bump actions/checkout from 2 to 3
Bumps [actions/checkout](https://github.com/actions/checkout) from 2 to 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/v2...v3)

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

Signed-off-by: dependabot[bot] <support@github.com>
2022-03-07 04:10:46 +00:00
dependabot[bot]
8b32ec40ba build(deps-dev): bump @types/jest from 27.4.0 to 27.4.1
Bumps [@types/jest](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/jest) from 27.4.0 to 27.4.1.
- [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>
2022-02-24 04:02:00 +00:00
Joe Becher
b049ab51f4 Merge pull request #548 from codecov/dependabot/npm_and_yarn/jest-junit-13.0.0
build(deps-dev): bump jest-junit from 12.2.0 to 13.0.0
2022-02-16 09:57:14 -05:00
Joe Becher
a85bdd422f Merge pull request #603 from codecov/snyk-upgrade-7ef3b58fd04f304bea31f63ba043acdd
[Snyk] Upgrade @actions/core from 1.5.0 to 1.6.0
2022-02-16 09:53:20 -05:00
dependabot[bot]
108007e68f build(deps-dev): bump @vercel/ncc from 0.30.0 to 0.33.3
Bumps [@vercel/ncc](https://github.com/vercel/ncc) from 0.30.0 to 0.33.3.
- [Release notes](https://github.com/vercel/ncc/releases)
- [Commits](https://github.com/vercel/ncc/compare/0.30.0...0.33.3)

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

Signed-off-by: dependabot[bot] <support@github.com>
2022-02-16 14:43:47 +00:00
Joe Becher
bf6b3a72da Merge pull request #653 from codecov/dependabot/npm_and_yarn/types/node-17.0.18
build(deps-dev): bump @types/node from 16.11.21 to 17.0.18
2022-02-16 09:42:56 -05:00
Joe Becher
a485989079 Merge pull request #636 from codecov/dependabot/npm_and_yarn/openpgp-5.1.0
build(deps): bump openpgp from 5.0.1 to 5.1.0
2022-02-16 09:32:13 -05:00
Joe Becher
7b31018a7e Merge pull request #643 from ichizok/fix/readme
Fix the layout of "functionalities" argument in README.md
2022-02-16 09:30:34 -05:00
dependabot[bot]
bcaaa7b51e build(deps): bump openpgp from 5.0.1 to 5.1.0
Bumps [openpgp](https://github.com/openpgpjs/openpgpjs) from 5.0.1 to 5.1.0.
- [Release notes](https://github.com/openpgpjs/openpgpjs/releases)
- [Commits](https://github.com/openpgpjs/openpgpjs/compare/v5.0.1...v5.1.0)

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

Signed-off-by: dependabot[bot] <support@github.com>
2022-02-16 14:18:52 +00:00
Joe Becher
d1701787c1 Merge pull request #634 from codecov/dependabot/npm_and_yarn/node-fetch-3.2.0
build(deps): bump node-fetch from 3.1.1 to 3.2.0
2022-02-16 09:17:40 -05:00
dependabot[bot]
d7cfb89995 build(deps-dev): bump @types/node from 16.11.21 to 17.0.18
Bumps [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node) from 16.11.21 to 17.0.18.
- [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-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-02-15 04:02:51 +00:00
ichizok
e01bbc8240 Fix the layout of "functionalities" argument 2022-02-04 11:41:23 +09:00
dependabot[bot]
db6357e737 build(deps): bump node-fetch from 3.1.1 to 3.2.0
Bumps [node-fetch](https://github.com/node-fetch/node-fetch) from 3.1.1 to 3.2.0.
- [Release notes](https://github.com/node-fetch/node-fetch/releases)
- [Changelog](https://github.com/node-fetch/node-fetch/blob/main/docs/CHANGELOG.md)
- [Commits](https://github.com/node-fetch/node-fetch/compare/v3.1.1...v3.2.0)

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

Signed-off-by: dependabot[bot] <support@github.com>
2022-01-21 04:02:18 +00:00
dependabot[bot]
6f19c0f88c build(deps-dev): bump jest-junit from 12.2.0 to 13.0.0
Bumps [jest-junit](https://github.com/jest-community/jest-junit) from 12.2.0 to 13.0.0.
- [Release notes](https://github.com/jest-community/jest-junit/releases)
- [Commits](https://github.com/jest-community/jest-junit/compare/v12.2.0...v13.0.0)

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

Signed-off-by: dependabot[bot] <support@github.com>
2022-01-20 19:26:23 +00:00
Mitchell Borrego
6c33a9bebe Merge pull request #632 from codecov/chore/bump-deps
Regenerate package-lock.json
2022-01-20 14:24:21 -05:00
Mitchell Borrego
c2991883fa Regenerate package-lock.json 2022-01-20 13:58:59 -05:00
Joe Becher
56370063d3 Merge pull request #628 from codecov/dependabot/npm_and_yarn/node-fetch-3.1.1
build(deps): bump node-fetch from 2.6.1 to 3.1.1
2022-01-18 17:50:13 -05:00
dependabot[bot]
50287531e1 build(deps): bump node-fetch from 2.6.1 to 3.1.1
Bumps [node-fetch](https://github.com/node-fetch/node-fetch) from 2.6.1 to 3.1.1.
- [Release notes](https://github.com/node-fetch/node-fetch/releases)
- [Changelog](https://github.com/node-fetch/node-fetch/blob/main/docs/CHANGELOG.md)
- [Commits](https://github.com/node-fetch/node-fetch/compare/v2.6.1...v3.1.1)

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

Signed-off-by: dependabot[bot] <support@github.com>
2022-01-17 04:02:48 +00:00
snyk-bot
2f3807462c fix: upgrade @actions/core from 1.5.0 to 1.6.0
Snyk has created this PR to upgrade @actions/core from 1.5.0 to 1.6.0.

See this package in npm:
https://www.npmjs.com/package/@actions/core

See this project in Snyk:
https://app.snyk.io/org/mitchell-codecov/project/8cddb358-dee3-4d13-9d92-bcb2603e196f?utm_source=github&utm_medium=referral&page=upgrade-pr
2021-12-10 22:00:19 +00:00
Tom Hu
260aa3b4b2 Merge pull request #528 from eltociear/patch-1
chore: Fix typo in index.js
2021-10-04 19:47:06 -04:00
Ikko Ashimine
42ece2600c chore: Fix typo in index.js
wether -> whether
2021-09-18 18:28:40 +09:00
Tom Hu
f32b3a3741 Merge pull request #515 from codecov/specify-version
Allow specifying version of Codecov uploader
2021-09-13 08:58:22 -04:00
Tom Hu
72dfd4782e Allow specifying version of Codecov uploader 2021-09-09 14:53:12 -04:00
Tom Hu
46edaeda0c Merge pull request #499 from codecov/dependabot/npm_and_yarn/vercel/ncc-0.30.0
build(deps-dev): bump @vercel/ncc from 0.29.0 to 0.30.0
2021-09-09 13:21:21 -04:00
Tom Hu
b6fd8cc98b Merge pull request #508 from codecov/dependabot/npm_and_yarn/openpgp-5.0.0
build(deps): bump openpgp from 5.0.0-5 to 5.0.0
2021-09-09 13:20:49 -04:00
dependabot[bot]
07a4e975bb build(deps-dev): bump @vercel/ncc from 0.29.0 to 0.30.0
Bumps [@vercel/ncc](https://github.com/vercel/ncc) from 0.29.0 to 0.30.0.
- [Release notes](https://github.com/vercel/ncc/releases)
- [Commits](https://github.com/vercel/ncc/compare/0.29.0...0.30.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>
2021-09-09 17:17:40 +00:00
dependabot[bot]
c071c7087f build(deps): bump openpgp from 5.0.0-5 to 5.0.0
Bumps [openpgp](https://github.com/openpgpjs/openpgpjs) from 5.0.0-5 to 5.0.0.
- [Release notes](https://github.com/openpgpjs/openpgpjs/releases)
- [Commits](https://github.com/openpgpjs/openpgpjs/compare/v5.0.0-5...v5.0.0)

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

Signed-off-by: dependabot[bot] <support@github.com>
2021-09-09 17:17:14 +00:00
Tom Hu
f6d4366a4c Merge pull request #514 from codecov/dependabot/npm_and_yarn/types/node-16.9.0
build(deps-dev): bump @types/node from 16.6.0 to 16.9.0
2021-09-09 13:16:10 -04:00
dependabot[bot]
2bbefc9105 build(deps-dev): bump @types/node from 16.6.0 to 16.9.0
Bumps [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node) from 16.6.0 to 16.9.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>
2021-09-09 04:03:24 +00:00
21 changed files with 16727 additions and 6182 deletions

View File

@@ -8,7 +8,7 @@ jobs:
os: [macos-latest, windows-latest, ubuntu-latest]
steps:
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v3
- name: Upload coverage to Codecov (script)
uses: ./
with:
@@ -22,6 +22,14 @@ jobs:
file: ./coverage/coverage-final.json
flags: demo,${{ matrix.os }}
name: codecov-demo
- name: Upload coverage to Codecov (version)
uses: ./
with:
files: ./coverage/calculator/coverage-final.json,./coverage/coverage-test/coverage-final.json
file: ./coverage/coverage-final.json
flags: version,${{ matrix.os }}
name: codecov-version
version: v0.1.0_8880
run:
runs-on: ${{ matrix.os }}
strategy:
@@ -29,7 +37,7 @@ jobs:
os: [macos-latest, windows-latest, ubuntu-latest]
steps:
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v3
- name: Install dependencies
run: npm install
- name: Lint
@@ -49,3 +57,11 @@ jobs:
file: ./coverage/coverage-final.json
flags: demo,${{ matrix.os }}
name: codecov-demo
- name: Upload coverage to Codecov (version)
uses: ./
with:
files: ./coverage/calculator/coverage-final.json,./coverage/coverage-test/coverage-final.json
file: ./coverage/coverage-final.json
flags: version,${{ matrix.os }}
name: codecov-version
version: v0.1.0_8880

View File

@@ -1,3 +1,37 @@
## 3.0.0
### Breaking Changes
- #689 Bump to node16 and small fixes
### Features
- #688 Incorporate `gcov` arguments for the Codecov uploader
### Dependencies
- #548 build(deps-dev): bump jest-junit from 12.2.0 to 13.0.0
- #603 [Snyk] Upgrade @actions/core from 1.5.0 to 1.6.0
- #628 build(deps): bump node-fetch from 2.6.1 to 3.1.1
- #634 build(deps): bump node-fetch from 3.1.1 to 3.2.0
- #636 build(deps): bump openpgp from 5.0.1 to 5.1.0
- #652 build(deps-dev): bump @vercel/ncc from 0.30.0 to 0.33.3
- #653 build(deps-dev): bump @types/node from 16.11.21 to 17.0.18
- #659 build(deps-dev): bump @types/jest from 27.4.0 to 27.4.1
- #667 build(deps): bump actions/checkout from 2 to 3
- #673 build(deps): bump node-fetch from 3.2.0 to 3.2.3
- #683 build(deps): bump minimist from 1.2.5 to 1.2.6
- #685 build(deps): bump @actions/github from 5.0.0 to 5.0.1
- #681 build(deps-dev): bump @types/node from 17.0.18 to 17.0.23
- #682 build(deps-dev): bump typescript from 4.5.5 to 4.6.3
- #676 build(deps): bump @actions/exec from 1.1.0 to 1.1.1
- #675 build(deps): bump openpgp from 5.1.0 to 5.2.1
## 2.1.0
### Features
- #515 Allow specifying version of Codecov uploader
### Dependencies
- #499 build(deps-dev): bump @vercel/ncc from 0.29.0 to 0.30.0
- #508 build(deps): bump openpgp from 5.0.0-5 to 5.0.0
- #514 build(deps-dev): bump @types/node from 16.6.0 to 16.9.0
## 2.0.3
### Fixes
- #464 Fix wrong link in the readme

View File

@@ -3,5 +3,5 @@ deploy:
git tag -d v2
git push origin :v2
git tag v2
git tag v$(VERSION) -m ""
git tag v$(VERSION) -s -m ""
git push origin --tags

View File

@@ -59,8 +59,12 @@ Codecov's Action currently supports five inputs from the user: `token`, `file`,
| `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
| `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
-| | `network` Disable uploading the file network |
| `functionalities` | Toggle functionalities | Optional
| | `network` Disable uploading the file network |
| `gcov` | Run with gcov support |
| `gcov_args` | Extra arguments to pass to gcov |
| `gcov_ignore` | Paths to ignore during gcov gathering |
| `gcov_include` | Paths to include during gcov gathering |
| `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
@@ -73,6 +77,7 @@ Codecov's Action currently supports five inputs from the user: `token`, `file`,
| `slug` | Specify the slug manually (Enterprise use) | Optional
| `url` | Change the upload host (Enterprise use) | Optional
| `verbose` | Specify whether the Codecov output should be verbose | Optional
| `version` | Specify which version of the Codecov Uploader should be used. Defaults to `latest` | Optional
| `working-directory` | Directory in which to execute `codecov.sh` | Optional
### Example `workflow.yml` with Codecov Action

View File

@@ -32,6 +32,18 @@ inputs:
functionalities:
description: 'Comma-separated list, see the README for options and their usage'
required: false
gcov:
description: 'Run with gcov support'
required: false
gcov_args:
description: 'Extra arguments to pass 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
@@ -68,6 +80,9 @@ inputs:
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`'
required: false
working-directory:
description: 'Directory in which to execute codecov.sh'
required: false
@@ -75,5 +90,5 @@ branding:
color: 'red'
icon: 'umbrella'
runs:
using: 'node12'
using: 'node16'
main: 'dist/index.js'

453
dist/37.index.js vendored Normal file
View File

@@ -0,0 +1,453 @@
"use strict";
exports.id = 37;
exports.ids = [37];
exports.modules = {
/***/ 4037:
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ "toFormData": () => (/* binding */ toFormData)
/* harmony export */ });
/* harmony import */ var fetch_blob_from_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(2777);
/* harmony import */ var formdata_polyfill_esm_min_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(8010);
let s = 0;
const S = {
START_BOUNDARY: s++,
HEADER_FIELD_START: s++,
HEADER_FIELD: s++,
HEADER_VALUE_START: s++,
HEADER_VALUE: s++,
HEADER_VALUE_ALMOST_DONE: s++,
HEADERS_ALMOST_DONE: s++,
PART_DATA_START: s++,
PART_DATA: s++,
END: s++
};
let f = 1;
const F = {
PART_BOUNDARY: f,
LAST_BOUNDARY: f *= 2
};
const LF = 10;
const CR = 13;
const SPACE = 32;
const HYPHEN = 45;
const COLON = 58;
const A = 97;
const Z = 122;
const lower = c => c | 0x20;
const noop = () => {};
class MultipartParser {
/**
* @param {string} boundary
*/
constructor(boundary) {
this.index = 0;
this.flags = 0;
this.onHeaderEnd = noop;
this.onHeaderField = noop;
this.onHeadersEnd = noop;
this.onHeaderValue = noop;
this.onPartBegin = noop;
this.onPartData = noop;
this.onPartEnd = noop;
this.boundaryChars = {};
boundary = '\r\n--' + boundary;
const ui8a = new Uint8Array(boundary.length);
for (let i = 0; i < boundary.length; i++) {
ui8a[i] = boundary.charCodeAt(i);
this.boundaryChars[ui8a[i]] = true;
}
this.boundary = ui8a;
this.lookbehind = new Uint8Array(this.boundary.length + 8);
this.state = S.START_BOUNDARY;
}
/**
* @param {Uint8Array} data
*/
write(data) {
let i = 0;
const length_ = data.length;
let previousIndex = this.index;
let {lookbehind, boundary, boundaryChars, index, state, flags} = this;
const boundaryLength = this.boundary.length;
const boundaryEnd = boundaryLength - 1;
const bufferLength = data.length;
let c;
let cl;
const mark = name => {
this[name + 'Mark'] = i;
};
const clear = name => {
delete this[name + 'Mark'];
};
const callback = (callbackSymbol, start, end, ui8a) => {
if (start === undefined || start !== end) {
this[callbackSymbol](ui8a && ui8a.subarray(start, end));
}
};
const dataCallback = (name, clear) => {
const markSymbol = name + 'Mark';
if (!(markSymbol in this)) {
return;
}
if (clear) {
callback(name, this[markSymbol], i, data);
delete this[markSymbol];
} else {
callback(name, this[markSymbol], data.length, data);
this[markSymbol] = 0;
}
};
for (i = 0; i < length_; i++) {
c = data[i];
switch (state) {
case S.START_BOUNDARY:
if (index === boundary.length - 2) {
if (c === HYPHEN) {
flags |= F.LAST_BOUNDARY;
} else if (c !== CR) {
return;
}
index++;
break;
} else if (index - 1 === boundary.length - 2) {
if (flags & F.LAST_BOUNDARY && c === HYPHEN) {
state = S.END;
flags = 0;
} else if (!(flags & F.LAST_BOUNDARY) && c === LF) {
index = 0;
callback('onPartBegin');
state = S.HEADER_FIELD_START;
} else {
return;
}
break;
}
if (c !== boundary[index + 2]) {
index = -2;
}
if (c === boundary[index + 2]) {
index++;
}
break;
case S.HEADER_FIELD_START:
state = S.HEADER_FIELD;
mark('onHeaderField');
index = 0;
// falls through
case S.HEADER_FIELD:
if (c === CR) {
clear('onHeaderField');
state = S.HEADERS_ALMOST_DONE;
break;
}
index++;
if (c === HYPHEN) {
break;
}
if (c === COLON) {
if (index === 1) {
// empty header field
return;
}
dataCallback('onHeaderField', true);
state = S.HEADER_VALUE_START;
break;
}
cl = lower(c);
if (cl < A || cl > Z) {
return;
}
break;
case S.HEADER_VALUE_START:
if (c === SPACE) {
break;
}
mark('onHeaderValue');
state = S.HEADER_VALUE;
// falls through
case S.HEADER_VALUE:
if (c === CR) {
dataCallback('onHeaderValue', true);
callback('onHeaderEnd');
state = S.HEADER_VALUE_ALMOST_DONE;
}
break;
case S.HEADER_VALUE_ALMOST_DONE:
if (c !== LF) {
return;
}
state = S.HEADER_FIELD_START;
break;
case S.HEADERS_ALMOST_DONE:
if (c !== LF) {
return;
}
callback('onHeadersEnd');
state = S.PART_DATA_START;
break;
case S.PART_DATA_START:
state = S.PART_DATA;
mark('onPartData');
// falls through
case S.PART_DATA:
previousIndex = index;
if (index === 0) {
// boyer-moore derrived algorithm to safely skip non-boundary data
i += boundaryEnd;
while (i < bufferLength && !(data[i] in boundaryChars)) {
i += boundaryLength;
}
i -= boundaryEnd;
c = data[i];
}
if (index < boundary.length) {
if (boundary[index] === c) {
if (index === 0) {
dataCallback('onPartData', true);
}
index++;
} else {
index = 0;
}
} else if (index === boundary.length) {
index++;
if (c === CR) {
// CR = part boundary
flags |= F.PART_BOUNDARY;
} else if (c === HYPHEN) {
// HYPHEN = end boundary
flags |= F.LAST_BOUNDARY;
} else {
index = 0;
}
} else if (index - 1 === boundary.length) {
if (flags & F.PART_BOUNDARY) {
index = 0;
if (c === LF) {
// unset the PART_BOUNDARY flag
flags &= ~F.PART_BOUNDARY;
callback('onPartEnd');
callback('onPartBegin');
state = S.HEADER_FIELD_START;
break;
}
} else if (flags & F.LAST_BOUNDARY) {
if (c === HYPHEN) {
callback('onPartEnd');
state = S.END;
flags = 0;
} else {
index = 0;
}
} else {
index = 0;
}
}
if (index > 0) {
// when matching a possible boundary, keep a lookbehind reference
// in case it turns out to be a false lead
lookbehind[index - 1] = c;
} else if (previousIndex > 0) {
// if our boundary turned out to be rubbish, the captured lookbehind
// belongs to partData
const _lookbehind = new Uint8Array(lookbehind.buffer, lookbehind.byteOffset, lookbehind.byteLength);
callback('onPartData', 0, previousIndex, _lookbehind);
previousIndex = 0;
mark('onPartData');
// reconsider the current character even so it interrupted the sequence
// it could be the beginning of a new sequence
i--;
}
break;
case S.END:
break;
default:
throw new Error(`Unexpected state entered: ${state}`);
}
}
dataCallback('onHeaderField');
dataCallback('onHeaderValue');
dataCallback('onPartData');
// Update properties for the next call
this.index = index;
this.state = state;
this.flags = flags;
}
end() {
if ((this.state === S.HEADER_FIELD_START && this.index === 0) ||
(this.state === S.PART_DATA && this.index === this.boundary.length)) {
this.onPartEnd();
} else if (this.state !== S.END) {
throw new Error('MultipartParser.end(): stream ended unexpectedly');
}
}
}
function _fileName(headerValue) {
// matches either a quoted-string or a token (RFC 2616 section 19.5.1)
const m = headerValue.match(/\bfilename=("(.*?)"|([^()<>@,;:\\"/[\]?={}\s\t]+))($|;\s)/i);
if (!m) {
return;
}
const match = m[2] || m[3] || '';
let filename = match.slice(match.lastIndexOf('\\') + 1);
filename = filename.replace(/%22/g, '"');
filename = filename.replace(/&#(\d{4});/g, (m, code) => {
return String.fromCharCode(code);
});
return filename;
}
async function toFormData(Body, ct) {
if (!/multipart/i.test(ct)) {
throw new TypeError('Failed to fetch');
}
const m = ct.match(/boundary=(?:"([^"]+)"|([^;]+))/i);
if (!m) {
throw new TypeError('no or bad content-type header, no multipart boundary');
}
const parser = new MultipartParser(m[1] || m[2]);
let headerField;
let headerValue;
let entryValue;
let entryName;
let contentType;
let filename;
const entryChunks = [];
const formData = new formdata_polyfill_esm_min_js__WEBPACK_IMPORTED_MODULE_1__/* .FormData */ .Ct();
const onPartData = ui8a => {
entryValue += decoder.decode(ui8a, {stream: true});
};
const appendToFile = ui8a => {
entryChunks.push(ui8a);
};
const appendFileToFormData = () => {
const file = new fetch_blob_from_js__WEBPACK_IMPORTED_MODULE_0__/* .File */ .$B(entryChunks, filename, {type: contentType});
formData.append(entryName, file);
};
const appendEntryToFormData = () => {
formData.append(entryName, entryValue);
};
const decoder = new TextDecoder('utf-8');
decoder.decode();
parser.onPartBegin = function () {
parser.onPartData = onPartData;
parser.onPartEnd = appendEntryToFormData;
headerField = '';
headerValue = '';
entryValue = '';
entryName = '';
contentType = '';
filename = null;
entryChunks.length = 0;
};
parser.onHeaderField = function (ui8a) {
headerField += decoder.decode(ui8a, {stream: true});
};
parser.onHeaderValue = function (ui8a) {
headerValue += decoder.decode(ui8a, {stream: true});
};
parser.onHeaderEnd = function () {
headerValue += decoder.decode();
headerField = headerField.toLowerCase();
if (headerField === 'content-disposition') {
// matches either a quoted-string or a token (RFC 2616 section 19.5.1)
const m = headerValue.match(/\bname=("([^"]*)"|([^()<>@,;:\\"/[\]?={}\s\t]+))/i);
if (m) {
entryName = m[2] || m[3] || '';
}
filename = _fileName(headerValue);
if (filename) {
parser.onPartData = appendToFile;
parser.onPartEnd = appendFileToFormData;
}
} else if (headerField === 'content-type') {
contentType = headerValue;
}
headerValue = '';
headerField = '';
};
for await (const chunk of Body) {
parser.write(chunk);
}
parser.end();
return formData;
}
/***/ })
};
;
//# sourceMappingURL=37.index.js.map

1
dist/37.index.js.map vendored Normal file

File diff suppressed because one or more lines are too long

453
dist/629.index.js vendored Normal file
View File

@@ -0,0 +1,453 @@
exports.id = 629;
exports.ids = [629];
exports.modules = {
/***/ 6629:
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ "toFormData": () => (/* binding */ toFormData)
/* harmony export */ });
/* harmony import */ var fetch_blob_from_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(4818);
/* harmony import */ var formdata_polyfill_esm_min_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(1402);
let s = 0;
const S = {
START_BOUNDARY: s++,
HEADER_FIELD_START: s++,
HEADER_FIELD: s++,
HEADER_VALUE_START: s++,
HEADER_VALUE: s++,
HEADER_VALUE_ALMOST_DONE: s++,
HEADERS_ALMOST_DONE: s++,
PART_DATA_START: s++,
PART_DATA: s++,
END: s++
};
let f = 1;
const F = {
PART_BOUNDARY: f,
LAST_BOUNDARY: f *= 2
};
const LF = 10;
const CR = 13;
const SPACE = 32;
const HYPHEN = 45;
const COLON = 58;
const A = 97;
const Z = 122;
const lower = c => c | 0x20;
const noop = () => {};
class MultipartParser {
/**
* @param {string} boundary
*/
constructor(boundary) {
this.index = 0;
this.flags = 0;
this.onHeaderEnd = noop;
this.onHeaderField = noop;
this.onHeadersEnd = noop;
this.onHeaderValue = noop;
this.onPartBegin = noop;
this.onPartData = noop;
this.onPartEnd = noop;
this.boundaryChars = {};
boundary = '\r\n--' + boundary;
const ui8a = new Uint8Array(boundary.length);
for (let i = 0; i < boundary.length; i++) {
ui8a[i] = boundary.charCodeAt(i);
this.boundaryChars[ui8a[i]] = true;
}
this.boundary = ui8a;
this.lookbehind = new Uint8Array(this.boundary.length + 8);
this.state = S.START_BOUNDARY;
}
/**
* @param {Uint8Array} data
*/
write(data) {
let i = 0;
const length_ = data.length;
let previousIndex = this.index;
let {lookbehind, boundary, boundaryChars, index, state, flags} = this;
const boundaryLength = this.boundary.length;
const boundaryEnd = boundaryLength - 1;
const bufferLength = data.length;
let c;
let cl;
const mark = name => {
this[name + 'Mark'] = i;
};
const clear = name => {
delete this[name + 'Mark'];
};
const callback = (callbackSymbol, start, end, ui8a) => {
if (start === undefined || start !== end) {
this[callbackSymbol](ui8a && ui8a.subarray(start, end));
}
};
const dataCallback = (name, clear) => {
const markSymbol = name + 'Mark';
if (!(markSymbol in this)) {
return;
}
if (clear) {
callback(name, this[markSymbol], i, data);
delete this[markSymbol];
} else {
callback(name, this[markSymbol], data.length, data);
this[markSymbol] = 0;
}
};
for (i = 0; i < length_; i++) {
c = data[i];
switch (state) {
case S.START_BOUNDARY:
if (index === boundary.length - 2) {
if (c === HYPHEN) {
flags |= F.LAST_BOUNDARY;
} else if (c !== CR) {
return;
}
index++;
break;
} else if (index - 1 === boundary.length - 2) {
if (flags & F.LAST_BOUNDARY && c === HYPHEN) {
state = S.END;
flags = 0;
} else if (!(flags & F.LAST_BOUNDARY) && c === LF) {
index = 0;
callback('onPartBegin');
state = S.HEADER_FIELD_START;
} else {
return;
}
break;
}
if (c !== boundary[index + 2]) {
index = -2;
}
if (c === boundary[index + 2]) {
index++;
}
break;
case S.HEADER_FIELD_START:
state = S.HEADER_FIELD;
mark('onHeaderField');
index = 0;
// falls through
case S.HEADER_FIELD:
if (c === CR) {
clear('onHeaderField');
state = S.HEADERS_ALMOST_DONE;
break;
}
index++;
if (c === HYPHEN) {
break;
}
if (c === COLON) {
if (index === 1) {
// empty header field
return;
}
dataCallback('onHeaderField', true);
state = S.HEADER_VALUE_START;
break;
}
cl = lower(c);
if (cl < A || cl > Z) {
return;
}
break;
case S.HEADER_VALUE_START:
if (c === SPACE) {
break;
}
mark('onHeaderValue');
state = S.HEADER_VALUE;
// falls through
case S.HEADER_VALUE:
if (c === CR) {
dataCallback('onHeaderValue', true);
callback('onHeaderEnd');
state = S.HEADER_VALUE_ALMOST_DONE;
}
break;
case S.HEADER_VALUE_ALMOST_DONE:
if (c !== LF) {
return;
}
state = S.HEADER_FIELD_START;
break;
case S.HEADERS_ALMOST_DONE:
if (c !== LF) {
return;
}
callback('onHeadersEnd');
state = S.PART_DATA_START;
break;
case S.PART_DATA_START:
state = S.PART_DATA;
mark('onPartData');
// falls through
case S.PART_DATA:
previousIndex = index;
if (index === 0) {
// boyer-moore derrived algorithm to safely skip non-boundary data
i += boundaryEnd;
while (i < bufferLength && !(data[i] in boundaryChars)) {
i += boundaryLength;
}
i -= boundaryEnd;
c = data[i];
}
if (index < boundary.length) {
if (boundary[index] === c) {
if (index === 0) {
dataCallback('onPartData', true);
}
index++;
} else {
index = 0;
}
} else if (index === boundary.length) {
index++;
if (c === CR) {
// CR = part boundary
flags |= F.PART_BOUNDARY;
} else if (c === HYPHEN) {
// HYPHEN = end boundary
flags |= F.LAST_BOUNDARY;
} else {
index = 0;
}
} else if (index - 1 === boundary.length) {
if (flags & F.PART_BOUNDARY) {
index = 0;
if (c === LF) {
// unset the PART_BOUNDARY flag
flags &= ~F.PART_BOUNDARY;
callback('onPartEnd');
callback('onPartBegin');
state = S.HEADER_FIELD_START;
break;
}
} else if (flags & F.LAST_BOUNDARY) {
if (c === HYPHEN) {
callback('onPartEnd');
state = S.END;
flags = 0;
} else {
index = 0;
}
} else {
index = 0;
}
}
if (index > 0) {
// when matching a possible boundary, keep a lookbehind reference
// in case it turns out to be a false lead
lookbehind[index - 1] = c;
} else if (previousIndex > 0) {
// if our boundary turned out to be rubbish, the captured lookbehind
// belongs to partData
const _lookbehind = new Uint8Array(lookbehind.buffer, lookbehind.byteOffset, lookbehind.byteLength);
callback('onPartData', 0, previousIndex, _lookbehind);
previousIndex = 0;
mark('onPartData');
// reconsider the current character even so it interrupted the sequence
// it could be the beginning of a new sequence
i--;
}
break;
case S.END:
break;
default:
throw new Error(`Unexpected state entered: ${state}`);
}
}
dataCallback('onHeaderField');
dataCallback('onHeaderValue');
dataCallback('onPartData');
// Update properties for the next call
this.index = index;
this.state = state;
this.flags = flags;
}
end() {
if ((this.state === S.HEADER_FIELD_START && this.index === 0) ||
(this.state === S.PART_DATA && this.index === this.boundary.length)) {
this.onPartEnd();
} else if (this.state !== S.END) {
throw new Error('MultipartParser.end(): stream ended unexpectedly');
}
}
}
function _fileName(headerValue) {
// matches either a quoted-string or a token (RFC 2616 section 19.5.1)
const m = headerValue.match(/\bfilename=("(.*?)"|([^()<>@,;:\\"/[\]?={}\s\t]+))($|;\s)/i);
if (!m) {
return;
}
const match = m[2] || m[3] || '';
let filename = match.slice(match.lastIndexOf('\\') + 1);
filename = filename.replace(/%22/g, '"');
filename = filename.replace(/&#(\d{4});/g, (m, code) => {
return String.fromCharCode(code);
});
return filename;
}
async function toFormData(Body, ct) {
if (!/multipart/i.test(ct)) {
throw new TypeError('Failed to fetch');
}
const m = ct.match(/boundary=(?:"([^"]+)"|([^;]+))/i);
if (!m) {
throw new TypeError('no or bad content-type header, no multipart boundary');
}
const parser = new MultipartParser(m[1] || m[2]);
let headerField;
let headerValue;
let entryValue;
let entryName;
let contentType;
let filename;
const entryChunks = [];
const formData = new formdata_polyfill_esm_min_js__WEBPACK_IMPORTED_MODULE_1__/* .FormData */ .Ct();
const onPartData = ui8a => {
entryValue += decoder.decode(ui8a, {stream: true});
};
const appendToFile = ui8a => {
entryChunks.push(ui8a);
};
const appendFileToFormData = () => {
const file = new fetch_blob_from_js__WEBPACK_IMPORTED_MODULE_0__/* .File */ .$B(entryChunks, filename, {type: contentType});
formData.append(entryName, file);
};
const appendEntryToFormData = () => {
formData.append(entryName, entryValue);
};
const decoder = new TextDecoder('utf-8');
decoder.decode();
parser.onPartBegin = function () {
parser.onPartData = onPartData;
parser.onPartEnd = appendEntryToFormData;
headerField = '';
headerValue = '';
entryValue = '';
entryName = '';
contentType = '';
filename = null;
entryChunks.length = 0;
};
parser.onHeaderField = function (ui8a) {
headerField += decoder.decode(ui8a, {stream: true});
};
parser.onHeaderValue = function (ui8a) {
headerValue += decoder.decode(ui8a, {stream: true});
};
parser.onHeaderEnd = function () {
headerValue += decoder.decode();
headerField = headerField.toLowerCase();
if (headerField === 'content-disposition') {
// matches either a quoted-string or a token (RFC 2616 section 19.5.1)
const m = headerValue.match(/\bname=("([^"]*)"|([^()<>@,;:\\"/[\]?={}\s\t]+))/i);
if (m) {
entryName = m[2] || m[3] || '';
}
filename = _fileName(headerValue);
if (filename) {
parser.onPartData = appendToFile;
parser.onPartEnd = appendFileToFormData;
}
} else if (headerField === 'content-type') {
contentType = headerValue;
}
headerValue = '';
headerField = '';
};
for await (const chunk of Body) {
parser.write(chunk);
}
parser.end();
return formData;
}
/***/ })
};
;
//# sourceMappingURL=629.index.js.map

1
dist/629.index.js.map vendored Normal file

File diff suppressed because one or more lines are too long

14001
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

File diff suppressed because one or more lines are too long

7799
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@@ -1,6 +1,6 @@
{
"name": "codecov-action",
"version": "2.0.3",
"version": "3.0.0",
"description": "Upload coverage reports to Codecov from GitHub Actions",
"main": "index.js",
"scripts": {
@@ -16,30 +16,30 @@
"url": "git+https://github.com/codecov/codecov-action.git"
},
"keywords": [],
"author": "Ibrahim Ali",
"author": "Codecov",
"license": "MIT",
"bugs": {
"url": "https://github.com/codecov/codecov-action/issues"
},
"homepage": "https://github.com/codecov/codecov-action#readme",
"dependencies": {
"@actions/core": "^1.5.0",
"@actions/exec": "^1.1.0",
"@actions/github": "^5.0.0",
"node-fetch": "^2.6.1",
"openpgp": "^5.0.0-5"
"@actions/core": "^1.6.0",
"@actions/exec": "^1.1.1",
"@actions/github": "^5.0.1",
"node-fetch": "^3.2.3",
"openpgp": "^5.2.1"
},
"devDependencies": {
"@types/jest": "^27.0.1",
"@types/node": "^16.6.2",
"@types/jest": "^27.4.1",
"@types/node": "^17.0.23",
"@typescript-eslint/eslint-plugin": "^4.29.2",
"@typescript-eslint/parser": "^4.29.2",
"@vercel/ncc": "^0.29.2",
"@vercel/ncc": "^0.33.3",
"eslint": "^7.32.0",
"eslint-config-google": "^0.14.0",
"jest": "^26.6.3",
"jest-junit": "^12.2.0",
"jest-junit": "^13.0.0",
"ts-jest": "^26.5.6",
"typescript": "^4.3.5"
"typescript": "^4.6.3"
}
}

View File

@@ -35,6 +35,10 @@ test('all arguments', () => {
'flags': 'test,test2',
'functionalities':
'network',
'gcov': 'true',
'gcov_args': '-v',
'gcov_ignore': '*.fake',
'gcov_include': 'real_file',
'move_coverage_to_trash': 'true',
'name': 'codecov',
'override_branch': 'thomasrockhu/test',
@@ -80,6 +84,13 @@ test('all arguments', () => {
'test',
'-F',
'test2',
'-g',
'--gcovArgs',
'-v',
'--gcovIgnore',
'*.fake',
'--gcovInclude',
'real_file',
'-B',
'thomasrockhu/test',
'-b',

View File

@@ -25,6 +25,10 @@ const buildExec = () => {
const file = core.getInput('file');
const files = core.getInput('files');
const flags = core.getInput('flags');
const gcov = core.getInput('gcov');
const gcovArgs = core.getInput('gcov_args');
const gcovIgnore = core.getInput('gcov_ignore');
const gcovInclude = core.getInput('gcov_include');
const functionalities = core.getInput('functionalities');
const name = core.getInput('name');
const os = core.getInput('os');
@@ -37,8 +41,9 @@ const buildExec = () => {
const searchDir = core.getInput('directory');
const slug = core.getInput('slug');
const token = core.getInput('token');
const verbose = isTrue(core.getInput('verbose'));
let uploaderVersion = core.getInput('version');
const url = core.getInput('url');
const verbose = isTrue(core.getInput('verbose'));
const workingDir = core.getInput('working-directory');
const execArgs = [];
@@ -104,6 +109,20 @@ const buildExec = () => {
execArgs.push('-F', `${f}`);
});
}
if (gcov) {
execArgs.push('-g');
}
if (gcovArgs) {
execArgs.push('--gcovArgs', `${gcovArgs}`);
}
if (gcovIgnore) {
execArgs.push('--gcovIgnore', `${gcovIgnore}`);
}
if (gcovInclude) {
execArgs.push('--gcovInclude', `${gcovInclude}`);
}
if (overrideBranch) {
execArgs.push('-B', `${overrideBranch}`);
}
@@ -147,7 +166,11 @@ const buildExec = () => {
options.cwd = workingDir;
}
return {execArgs, options, failCi, os};
if (uploaderVersion == '') {
uploaderVersion = 'latest';
}
return {execArgs, options, failCi, os, uploaderVersion};
};
export default buildExec;

View File

@@ -37,13 +37,22 @@ test('getPlatform', () => {
test('getBaseUrl', () => {
expect(PLATFORMS.map((platform) => {
return getBaseUrl(platform);
return getBaseUrl(platform, 'latest');
})).toEqual([
'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',
]);
expect(PLATFORMS.map((platform) => {
return getBaseUrl(platform, 'v0.1.0_8880');
})).toEqual([
'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',
]);
});
test('isWindows', () => {

View File

@@ -43,8 +43,8 @@ const getPlatform = (os?: string): string => {
return 'linux';
};
const getBaseUrl = (platform: string): string => {
return `https://uploader.codecov.io/latest/${platform}/${getUploaderName(platform)}`;
const getBaseUrl = (platform: string, version: string): string => {
return `https://uploader.codecov.io/${version}/${platform}/${getUploaderName(platform)}`;
};
export {

View File

@@ -13,15 +13,16 @@ import {
} from './helpers';
import verify from './validate';
import versionInfo from './version';
let failCi;
try {
const {execArgs, options, failCi, os} = buildExec();
const {execArgs, options, failCi, os, uploaderVersion} = buildExec();
const platform = getPlatform(os);
const filename = path.join( __dirname, getUploaderName(platform));
https.get(getBaseUrl(platform), (res) => {
https.get(getBaseUrl(platform, uploaderVersion), (res) => {
// Image will be stored at this path
const filePath = fs.createWriteStream(filename);
res.pipe(filePath);
@@ -34,7 +35,8 @@ try {
}).on('finish', async () => {
filePath.close();
await verify(filename, platform);
await verify(filename, platform, uploaderVersion);
await versionInfo(platform, uploaderVersion);
await fs.chmodSync(filename, '777');
const unlink = () => {

View File

@@ -12,7 +12,7 @@ import {
setFailure,
} from './helpers';
const verify = async (filename: string, platform: string) => {
const verify = async (filename: string, platform: string, version: string) => {
try {
const uploaderName = getUploaderName(platform);
@@ -23,10 +23,15 @@ const verify = async (filename: string, platform: string) => {
);
// Get SHASUM and SHASUM signature files
const shasumRes = await fetch( `${getBaseUrl(platform)}.SHA256SUM`);
console.log(`${getBaseUrl(platform, version)}.SHA256SUM`);
const shasumRes = await fetch.default(
`${getBaseUrl(platform, version)}.SHA256SUM`,
);
const shasum = await shasumRes.text();
const shaSigRes = await fetch( `${getBaseUrl(platform)}.SHA256SUM.sig`);
const shaSigRes = await fetch.default(
`${getBaseUrl(platform, version)}.SHA256SUM.sig`,
);
const shaSig = await shaSigRes.text();
// Verify shasum

19
src/version.ts Normal file
View File

@@ -0,0 +1,19 @@
import * as core from '@actions/core';
import * as fetch from 'node-fetch';
const versionInfo = async (platform: string, version?: string) => {
if (version) {
core.info(`==> Running version ${version}`);
}
try {
const metadataRes = await fetch.default( `https://uploader.codecov.io/${platform}/latest`, {
headers: {'Accept': 'application/json'},
});
const metadata = await metadataRes.json();
core.info(`==> Running version ${metadata['version']}`);
} catch (err) {
core.info(`Could not pull latest version information: ${err}`);
}
};
export default versionInfo;