Compare commits

..

19 Commits

Author SHA1 Message Date
Tom Hu
0cfda1dd0a chore(release): bump to 4.0.2 (#1302) 2024-02-23 08:17:38 -08:00
dependabot[bot]
7d3a55eb5e build(deps): bump actions/upload-artifact from 4.3.0 to 4.3.1 (#1286)
Bumps [actions/upload-artifact](https://github.com/actions/upload-artifact) from 4.3.0 to 4.3.1.
- [Release notes](https://github.com/actions/upload-artifact/releases)
- [Commits](26f96dfa69...5d5d22a312)

---
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>
2024-02-20 09:39:54 -05:00
dependabot[bot]
fe84a0b3c0 build(deps-dev): bump @typescript-eslint/eslint-plugin from 6.21.0 to 7.0.0 (#1290)
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.21.0 to 7.0.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/v7.0.0/packages/eslint-plugin)

---
updated-dependencies:
- dependency-name: "@typescript-eslint/eslint-plugin"
  dependency-type: direct:development
  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>
2024-02-20 09:37:05 -05:00
Jan Macku
e12c9402c4 Use updated syntax for GitHub Markdown notes (#1300)
doc: use updated syntax for GitHub Markdown notes

GitHub Discussions: https://github.com/orgs/community/discussions/16925
2024-02-20 09:25:02 -05:00
dependabot[bot]
ef7f8a5d3c build(deps): bump github/codeql-action from 3.24.0 to 3.24.3 (#1298)
Bumps [github/codeql-action](https://github.com/github/codeql-action) from 3.24.0 to 3.24.3.
- [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/v3.24.0...v3.24.3)

---
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>
2024-02-20 09:20:22 -05:00
dependabot[bot]
b8a1d6a424 build(deps-dev): bump @typescript-eslint/eslint-plugin from 6.20.0 to 6.21.0 (#1269)
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.20.0 to 6.21.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.21.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>
2024-02-06 23:11:07 -08:00
dependabot[bot]
6ef7ea4c74 build(deps-dev): bump @typescript-eslint/parser from 6.20.0 to 6.21.0 (#1271)
Bumps [@typescript-eslint/parser](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/parser) from 6.20.0 to 6.21.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.21.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>
2024-02-06 09:54:06 -08:00
Bo Anderson
f62c5eebfe fix: working-directory input for all stages (#1272) 2024-02-06 09:53:39 -08:00
Ian Lewis
fdbfa4b889 Add link to docs on Dependabot secrets (#1260) 2024-02-05 09:30:37 -08:00
John T. Wodder II
9855cf7bd1 Escape pipes in table of arguments (#1265) 2024-02-05 09:30:15 -08:00
dependabot[bot]
162c44c603 build(deps): bump github/codeql-action from 3.23.2 to 3.24.0 (#1266)
Bumps [github/codeql-action](https://github.com/github/codeql-action) from 3.23.2 to 3.24.0.
- [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/v3.23.2...v3.24.0)

---
updated-dependencies:
- dependency-name: github/codeql-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>
2024-02-05 09:26:44 -08:00
dependabot[bot]
a9883cc0b2 build(deps-dev): bump @types/jest from 29.5.11 to 29.5.12 (#1257)
Bumps [@types/jest](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/jest) from 29.5.11 to 29.5.12.
- [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>
2024-02-02 09:17:04 -08:00
Tom Hu
8c40c8cd55 Update README.md 2024-02-01 15:44:10 -08:00
Tom Hu
781907b2be Update README.md 2024-02-01 15:42:02 -08:00
Tom Hu
93b3dea0bf Update action.yml 2024-02-01 15:33:11 -08:00
Tom Hu
82ab52d110 Update README.md (#1251) 2024-02-01 14:26:09 -08:00
Tom Hu
e0b68c6749 fix: show both token uses in readme (#1250) 2024-02-01 14:13:53 -08:00
Tom Hu
1f9f5573d1 Add all args (#1245)
* fix: add all args from cli

* chore(release): bump to 4.0.1
2024-02-01 09:05:17 -08:00
Tom Hu
09686fcfcb Update README.md (#1243) 2024-01-31 12:44:28 -08:00
11 changed files with 775 additions and 263 deletions

View File

@@ -41,7 +41,7 @@ jobs:
# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v3.23.2
uses: github/codeql-action/init@v3.24.3
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@v3.23.2
uses: github/codeql-action/autobuild@v3.24.3
# 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@v3.23.2
uses: github/codeql-action/analyze@v3.24.3

View File

@@ -1,41 +1,6 @@
name: Workflow for Codecov Action
on: [push, pull_request]
jobs:
no-deps:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [macos-latest, windows-latest, ubuntu-latest]
steps:
- name: Checkout
uses: actions/checkout@v4.1.1
- name: Upload coverage to Codecov (script)
uses: ./
with:
files: ./coverage/script/coverage-final.json
flags: script,${{ matrix.os }}
name: codecov-script
verbose: true
token: ${{ secrets.CODECOV_TOKEN }}
- name: Upload coverage to Codecov (demo)
uses: ./
with:
files: ./coverage/calculator/coverage-final.json,./coverage/coverage-test/coverage-final.json
file: ./coverage/coverage-final.json
flags: demo,${{ matrix.os }}
name: codecov-demo
verbose: true
token: ${{ secrets.CODECOV_TOKEN }}
- 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.2.0
verbose: true
token: ${{ secrets.CODECOV_TOKEN }}
run:
runs-on: ${{ matrix.os }}
strategy:

View File

@@ -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@26f96dfa697d77e81fd5907df203aa23a56210a8 # v4.3.0
uses: actions/upload-artifact@5d5d22a31266ced268874388b861e4b58bb5c2f3 # v4.3.1
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@v3.23.2 # v1.0.26
uses: github/codeql-action/upload-sarif@v3.24.3 # v1.0.26
with:
sarif_file: results.sarif

105
README.md
View File

@@ -1,6 +1,6 @@
# Codecov GitHub Action
[![GitHub Marketplace](https://img.shields.io/badge/Marketplace-v3-undefined.svg?logo=github&logoColor=white&style=flat)](https://github.com/marketplace/actions/codecov)
[![GitHub Marketplace](https://img.shields.io/badge/Marketplace-v4-undefined.svg?logo=github&logoColor=white&style=flat)](https://github.com/marketplace/actions/codecov)
[![FOSSA Status](https://app.fossa.com/api/projects/git%2Bgithub.com%2Fcodecov%2Fcodecov-action.svg?type=shield)](https://app.fossa.com/projects/git%2Bgithub.com%2Fcodecov%2Fcodecov-action?ref=badge_shield)
[![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
@@ -8,10 +8,13 @@
## v4 Release
`v4` of the Codecov GitHub Action will use the [Codecov CLI](https://github.com/codecov/codecov-cli) to upload coverage reports to Codecov.
Breaking Changes
### Breaking Changes
- Tokenless uploading is unsupported. However, PRs made from forks to the upstream public repos will support tokenless (e.g. contributors to OS projects do not need the upstream repo's Codecov token)
- Various arguments to the Action have been removed
### Dependabot
- For repositories using `Dependabot`, users will need to ensure that it has access to the Codecov token for PRs from Dependabot to upload coverage. To do this, please add your `CODECOV_TOKEN` as a Dependabot Secret. For more information, see ["Configuring access to private registries for Dependabot."](https://docs.github.com/en/code-security/dependabot/working-with-dependabot/configuring-access-to-private-registries-for-dependabot#storing-credentials-for-dependabot-to-use)
`v3` versions and below will not have access to CLI features (e.g. global upload token, ATS).
## Usage
@@ -35,61 +38,70 @@ steps:
- uses: actions/checkout@master
- uses: codecov/codecov-action@v4
with:
fail_ci_if_error: true # optional (default = false)
files: ./coverage1.xml,./coverage2.xml # optional
flags: unittests # optional
name: codecov-umbrella # optional
token: ${{ secrets.CODECOV_TOKEN }} # required
verbose: true # optional (default = false)
```
The Codecov token can also be passed in via environment variables:
```yaml
steps:
- uses: actions/checkout@master
- uses: codecov/codecov-action@v4
with:
fail_ci_if_error: true # optional (default = false)
files: ./coverage1.xml,./coverage2.xml # optional
flags: unittests # optional
name: codecov-umbrella # optional
verbose: true # optional (default = false)
env:
token: ${{ secrets.CODECOV_TOKEN }}
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
```
>**Note**: This assumes that you've set your Codecov token inside *Settings > Secrets* as `CODECOV_TOKEN`. If not, you can [get an upload token](https://docs.codecov.io/docs/frequently-asked-questions#section-where-is-the-repository-upload-token-found-) for your specific repo on [codecov.io](https://www.codecov.io). Keep in mind that secrets are *not* available to forks of repositories.
> [!NOTE]
> This assumes that you've set your Codecov token inside *Settings > Secrets* as `CODECOV_TOKEN`. If not, you can [get an upload token](https://docs.codecov.io/docs/frequently-asked-questions#section-where-is-the-repository-upload-token-found-) for your specific repo on [codecov.io](https://www.codecov.io). Keep in mind that secrets are *not* available to forks of repositories.
## Arguments
Codecov's Action supports inputs from the user. These inputs, along with their descriptions and usage contexts, are listed in the table below:
| Input | Description | Usage |
| :---: | :---: | :---: |
| `token` | Used to authorize coverage report uploads | *Required |
| `move_coverage_to_trash` | Move discovered coverage reports to the trash | Optional
| `commit_parent` | The commit SHA of the parent for which you are uploading coverage. If not present, the parent will be determined using the API of your repository provider. When using the repository provider's API, the parent is determined via finding the closest ancestor to the commit. | Optional
| `dry_run` | Don't upload files to Codecov | 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
| `files` | Comma-separated paths to the coverage report(s). Negated paths are supported by starting with `!` | Optional
| `flags` | Flag the upload to group coverage metrics (unittests, uitests, etc.). Multiple flags are separated by a comma (ui,chrome) | Optional
| `full_report` | Specify the path of a full Codecov report to re-upload | Optional
| `functionalities` | Toggle functionalities | Optional
| -- `network` | Disable uploading the file network | Optional
| -- `fixes` | Enable file fixes to ignore common lines from coverage | Optional
| -- `search` | Disable searching for coverage files | Optional
| `gcov` | Run with gcov support | Optional
| `gcov_args` | Extra arguments to pass to gcov | Optional
| `gcov_ignore` | Paths to ignore during gcov gathering | Optional
| `gcov_include` | Paths to include during gcov gathering | Optional
| `gcov_executable` | gcov executable to run. Defaults to gcov. | Optional
| `name` | Custom defined name for the upload | Optional
| `network_filter` | Specify a filter on the files listed in the network section of the Codecov report. Useful for upload-specific path fixing | Optional
| `network_prefix` | Specify a prefix on files listed in the network section of the Codecov report. Useful to help resolve path fixing | Optional
| `os` | Specify the OS (linux, macos, windows, alpine) | Optional
| `override_branch` | Specify the branch name | Optional
| `override_build` | Specify the build number | Optional
| `override_commit` | Specify the commit SHA | Optional
| `override_pr` | Specify the pull request number | Optional
| `override_tag` | Specify the git tag | Optional
| `root_dir` | Used when not in git/hg project to identify project root directory | Optional
| `directory` | Directory to search for coverage reports. | Optional
| `slug` | Specify the slug manually (Enterprise use) | Optional
| `swift` | Run with swift coverage support | Optional
| -- `swift_project` | Specify the swift project to speed up coverage conversion | Optional
| `upstream_proxy` | The upstream http proxy server to connect through | 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
| `xtra_args` | Add additional uploader args that may be missing in the Action | Optional
| Input | Description | Required |
| :--- | :--- | :---: |
| `token` | Repository Codecov token. Used to authorize report uploads | *Required
| `codecov_yml_path` | Specify the path to the Codecov YML | Optional
| `commit_parent` | Override to specify the parent commit SHA | Optional
| `directory` | Directory to search for coverage reports. | Optional
| `disable_search` | Disable search for coverage files. This is helpful when specifying what files you want to upload with the --file option. | Optional
| `disable_file_fixes` | Disable file fixes to ignore common lines from coverage (e.g. blank lines or empty brackets) | Optional
| `dry_run` | Don't upload files to Codecov | Optional
| `env_vars` | Environment variables to tag the upload with (e.g. PYTHON \| OS,PYTHON) | Optional
| `exclude` | Folders to exclude from search | Optional
| `fail_ci_if_error` | Specify whether or not CI build should fail if Codecov runs into an error during upload | Optional
| `file` | Path to coverage file to upload | Optional
| `files` | Comma-separated list of files to upload | Optional
| `flags` | Flag upload to group coverage metrics (e.g. unittests \| integration \| ui,chrome) | Optional
| `handle_no_reports_found` | Raise no exceptions when no coverage reports found | Optional
| `job_code` | The job code | Optional
| `name` | User defined upload name. Visible in Codecov UI | Optional
| `os` | Override the assumed OS. Options are linux \| macos \| windows \| . | Optional
| `override_branch` | Specify the branch name | Optional
| `override_build` | Specify the build number | Optional
| `override_build_url` | The URL of the build where this is running | Optional
| `override_commit` | Specify the commit SHA | Optional
| `override_pr` | Specify the pull request number | Optional
| `plugin` | plugins to run. Options: xcode, gcov, pycoverage. The default behavior runs them all. | Optional
| `plugins` | Comma-separated list of plugins for use during upload. | Optional
| `report_code` | The code of the report. If unsure, do not include | Optional
| `root_dir` | Used when not in git/hg project to identify project root directory | Optional
| `slug` | Specify the slug manually (Enterprise use) | Optional
| `url` | Specify the base url to upload (Enterprise use) | Optional
| `use_legacy_upload_endpoint` | Use the legacy upload endpoint | Optional
| `verbose` | Specify whether the Codecov output should be verbose | Optional
| `version` | Specify which version of the Codecov CLI should be used. Defaults to `latest` | Optional
| `working-directory` | Directory in which to execute codecov.sh | Optional
### Example `workflow.yml` with Codecov Action
@@ -125,9 +137,8 @@ jobs:
files: ./coverage1.xml,./coverage2.xml,!./cache
flags: unittests
name: codecov-umbrella
verbose: true
env:
token: ${{ secrets.CODECOV_TOKEN }}
verbose: true
```
## Contributing

View File

@@ -3,13 +3,10 @@ description: 'GitHub Action that uploads coverage reports for your repository to
author: 'Ibrahim Ali <@ibrahim0814> & Thomas Hu <@thomasrockhu> | Codecov'
inputs:
token:
description: 'Repository upload token - get it from codecov.io. Required only for private repositories'
description: 'Repository Codecov token. Used to authorize report uploads'
required: false
file:
description: 'Path to coverage file to upload'
required: false
files:
description: 'Comma-separated list of files to upload'
codecov_yml_path:
description: 'Specify the path to the Codecov YML'
required: false
commit_parent:
description: 'Override to specify the parent commit SHA'
@@ -17,6 +14,12 @@ inputs:
directory:
description: 'Directory to search for coverage reports.'
required: false
disable_search:
description: 'Disable search for coverage files. This is helpful when specifying what files you want to upload with the --file option.'
required: false
disable_file_fixes:
description: 'Disable file fixes to ignore common lines from coverage (e.g. blank lines or empty brackets)'
required: false
dry_run:
description: "Don't upload files to Codecov"
required: false
@@ -29,9 +32,21 @@ inputs:
fail_ci_if_error:
description: 'Specify whether or not CI build should fail if Codecov runs into an error during upload'
required: false
file:
description: 'Path to coverage file to upload'
required: false
files:
description: 'Comma-separated list of files to upload'
required: false
flags:
description: 'Flag upload to group coverage metrics (e.g. unittests | integration | ui,chrome)'
required: false
handle_no_reports_found:
description: 'Raise no exceptions when no coverage reports found'
required: false
job_code:
description: 'The job code'
required: false
name:
description: 'User defined upload name. Visible in Codecov UI'
required: false
@@ -44,6 +59,9 @@ inputs:
override_build:
description: 'Specify the build number'
required: false
override_build_url:
description: 'The URL of the build where this is running'
required: false
override_commit:
description: 'Specify the commit SHA'
required: false
@@ -56,6 +74,9 @@ inputs:
plugins:
description: 'Comma-separated list of plugins for use during upload.'
required: false
report_code:
description: 'The code of the report. If unsure, do not include'
required: false
root_dir:
description: 'Used when not in git/hg project to identify project root directory'
required: false
@@ -65,6 +86,9 @@ inputs:
url:
description: 'Specify the base url to upload (Enterprise use)'
required: false
use_legacy_upload_endpoint:
description: 'Use the legacy upload endpoint'
required: false
verbose:
description: 'Specify whether the Codecov output should be verbose'
required: false

79
dist/index.js vendored
View File

@@ -32266,6 +32266,8 @@ const buildCommitExec = () => {
const overridePr = core.getInput('override_pr');
const slug = core.getInput('slug');
const token = core.getInput('token');
const failCi = isTrue(core.getInput('fail_ci_if_error'));
const workingDir = core.getInput('working-directory');
const commitCommand = 'create-commit';
const commitExecArgs = [];
const commitOptions = {};
@@ -32302,12 +32304,22 @@ const buildCommitExec = () => {
if (slug) {
commitExecArgs.push('--slug', `${slug}`);
}
if (failCi) {
commitExecArgs.push('-Z');
}
if (workingDir) {
commitOptions.cwd = workingDir;
}
return { commitExecArgs, commitOptions, commitCommand };
};
const buildGeneralExec = () => {
const codecovYmlPath = core.getInput('codecov_yml_path');
const url = core.getInput('url');
const verbose = isTrue(core.getInput('verbose'));
const args = [];
if (codecovYmlPath) {
args.push('--codecov-yml-path', `${codecovYmlPath}`);
}
if (url) {
args.push('--enterprise-url', `${url}`);
}
@@ -32318,8 +32330,11 @@ const buildGeneralExec = () => {
};
const buildReportExec = () => {
const overrideCommit = core.getInput('override_commit');
const overridePr = core.getInput('override_pr');
const slug = core.getInput('slug');
const token = core.getInput('token');
const failCi = isTrue(core.getInput('fail_ci_if_error'));
const workingDir = core.getInput('working-directory');
const reportCommand = 'create-report';
const reportExecArgs = [];
const reportOptions = {};
@@ -32341,33 +32356,52 @@ const buildReportExec = () => {
`${context.eventName}` == 'pull_request_target') {
reportExecArgs.push('-C', `${context.payload.pull_request.head.sha}`);
}
if (overridePr) {
reportExecArgs.push('-P', `${overridePr}`);
}
else if (`${context.eventName}` == 'pull_request_target') {
reportExecArgs.push('-P', `${context.payload.number}`);
}
if (slug) {
reportExecArgs.push('--slug', `${slug}`);
}
if (failCi) {
reportExecArgs.push('-Z');
}
if (workingDir) {
reportOptions.cwd = workingDir;
}
return { reportExecArgs, reportOptions, reportCommand };
};
const buildUploadExec = () => {
const envVars = core.getInput('env_vars');
const disableFileFixes = isTrue(core.getInput('disable_file_fixes'));
const disableSearch = isTrue(core.getInput('disable_search'));
const dryRun = isTrue(core.getInput('dry_run'));
const envVars = core.getInput('env_vars');
const exclude = core.getInput('exclude');
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 handleNoReportsFound = isTrue(core.getInput('handle_no_reports_found'));
const jobCode = core.getInput('job_code');
const name = core.getInput('name');
const os = core.getInput('os');
const overrideBranch = core.getInput('override_branch');
const overrideBuild = core.getInput('override_build');
const overrideBuildUrl = core.getInput('override_build_url');
const overrideCommit = core.getInput('override_commit');
const overridePr = core.getInput('override_pr');
const plugin = core.getInput('plugin');
const plugins = core.getInput('plugins');
const reportCode = core.getInput('report_code');
const rootDir = core.getInput('root_dir');
const searchDir = core.getInput('directory');
const slug = core.getInput('slug');
const token = core.getInput('token');
let uploaderVersion = core.getInput('version');
const useLegacyUploadEndpoint = isTrue(core.getInput('use_legacy_upload_endpoint'));
const workingDir = core.getInput('working-directory');
const plugin = core.getInput('plugin');
const exclude = core.getInput('exclude');
const uploadExecArgs = [];
const uploadCommand = 'do-upload';
const uploadOptions = {};
@@ -32387,18 +32421,24 @@ const buildUploadExec = () => {
envVarsArg.push(envVarClean);
}
}
if (name) {
uploadExecArgs.push('-n', `${name}`);
}
if (token) {
uploadOptions.env.CODECOV_TOKEN = token;
}
if (disableFileFixes) {
uploadExecArgs.push('--disable-file-fixes');
}
if (disableSearch) {
uploadExecArgs.push('--disable-search');
}
if (dryRun) {
uploadExecArgs.push('-d');
}
if (envVarsArg.length) {
uploadExecArgs.push('-e', envVarsArg.join(','));
}
if (exclude) {
uploadExecArgs.push('--exclude', `${exclude}`);
}
if (failCi) {
uploadExecArgs.push('-Z');
}
@@ -32415,12 +32455,24 @@ const buildUploadExec = () => {
uploadExecArgs.push('-F', `${f}`);
});
}
if (handleNoReportsFound) {
uploadExecArgs.push('--handle-no-reports-found');
}
if (jobCode) {
uploadExecArgs.push('--job-code', `${jobCode}`);
}
if (name) {
uploadExecArgs.push('-n', `${name}`);
}
if (overrideBranch) {
uploadExecArgs.push('-B', `${overrideBranch}`);
}
if (overrideBuild) {
uploadExecArgs.push('-b', `${overrideBuild}`);
}
if (overrideBuildUrl) {
uploadExecArgs.push('--build-url', `${overrideBuildUrl}`);
}
if (overrideCommit) {
uploadExecArgs.push('-C', `${overrideCommit}`);
}
@@ -32434,11 +32486,17 @@ const buildUploadExec = () => {
else if (`${context.eventName}` == 'pull_request_target') {
uploadExecArgs.push('-P', `${context.payload.number}`);
}
if (plugin) {
uploadExecArgs.push('--plugin', `${plugin}`);
}
if (plugins) {
plugins.split(',').map((p) => p.trim()).forEach((p) => {
uploadExecArgs.push('--plugin', `${p}`);
});
}
if (reportCode) {
uploadExecArgs.push('--report-code', `${reportCode}`);
}
if (rootDir) {
uploadExecArgs.push('--network-root-folder', `${rootDir}`);
}
@@ -32451,15 +32509,12 @@ const buildUploadExec = () => {
if (workingDir) {
uploadOptions.cwd = workingDir;
}
if (plugin) {
uploadExecArgs.push('--plugin', `${plugin}`);
}
if (exclude) {
uploadExecArgs.push('--exclude', `${exclude}`);
}
if (uploaderVersion == '') {
uploaderVersion = 'latest';
}
if (useLegacyUploadEndpoint) {
uploadExecArgs.push('--legacy');
}
return {
uploadExecArgs,
uploadOptions,

2
dist/index.js.map vendored

File diff suppressed because one or more lines are too long

580
package-lock.json generated
View File

@@ -1,12 +1,12 @@
{
"name": "codecov-action",
"version": "4.0.0",
"version": "4.0.2",
"lockfileVersion": 2,
"requires": true,
"packages": {
"": {
"name": "codecov-action",
"version": "4.0.0",
"version": "4.0.2",
"license": "MIT",
"dependencies": {
"@actions/core": "^1.10.1",
@@ -16,9 +16,9 @@
"undici": "5.28.2"
},
"devDependencies": {
"@types/jest": "^29.5.11",
"@typescript-eslint/eslint-plugin": "^6.20.0",
"@typescript-eslint/parser": "^6.20.0",
"@types/jest": "^29.5.12",
"@typescript-eslint/eslint-plugin": "^7.0.0",
"@typescript-eslint/parser": "^6.21.0",
"@vercel/ncc": "^0.38.1",
"eslint": "^8.56.0",
"eslint-config-google": "^0.14.0",
@@ -1532,9 +1532,9 @@
}
},
"node_modules/@types/jest": {
"version": "29.5.11",
"resolved": "https://registry.npmjs.org/@types/jest/-/jest-29.5.11.tgz",
"integrity": "sha512-S2mHmYIVe13vrm6q4kN6fLYYAka15ALQki/vgDC3mIukEOx8WJlv0kQPM+d4w8Gp6u0uSdKND04IlTXBv0rwnQ==",
"version": "29.5.12",
"resolved": "https://registry.npmjs.org/@types/jest/-/jest-29.5.12.tgz",
"integrity": "sha512-eDC8bTvT/QhYdxJAulQikueigY5AsdBRH2yDKW3yveW7svY3+DzN84/2NUgkw10RTiJbWqZrTtoGVdYlvFJdLw==",
"dev": true,
"dependencies": {
"expect": "^29.0.0",
@@ -1557,9 +1557,9 @@
}
},
"node_modules/@types/semver": {
"version": "7.5.6",
"resolved": "https://registry.npmjs.org/@types/semver/-/semver-7.5.6.tgz",
"integrity": "sha512-dn1l8LaMea/IjDoHNd9J52uBbInB796CDffS6VdIxvqYCPSG0V0DzHp76GpaWnlhg88uYyPbXCDIowa86ybd5A==",
"version": "7.5.7",
"resolved": "https://registry.npmjs.org/@types/semver/-/semver-7.5.7.tgz",
"integrity": "sha512-/wdoPq1QqkSj9/QOeKkFquEuPzQbHTWAMPH/PaUMB+JuR31lXhlWXRZ52IpfDYVlDOUBvX09uBrPwxGT1hjNBg==",
"dev": true
},
"node_modules/@types/stack-utils": {
@@ -1584,16 +1584,16 @@
"dev": true
},
"node_modules/@typescript-eslint/eslint-plugin": {
"version": "6.20.0",
"resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-6.20.0.tgz",
"integrity": "sha512-fTwGQUnjhoYHeSF6m5pWNkzmDDdsKELYrOBxhjMrofPqCkoC2k3B2wvGHFxa1CTIqkEn88nlW1HVMztjo2K8Hg==",
"version": "7.0.0",
"resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-7.0.0.tgz",
"integrity": "sha512-M72SJ0DkcQVmmsbqlzc6EJgb/3Oz2Wdm6AyESB4YkGgCxP8u5jt5jn4/OBMPK3HLOxcttZq5xbBBU7e2By4SZQ==",
"dev": true,
"dependencies": {
"@eslint-community/regexpp": "^4.5.1",
"@typescript-eslint/scope-manager": "6.20.0",
"@typescript-eslint/type-utils": "6.20.0",
"@typescript-eslint/utils": "6.20.0",
"@typescript-eslint/visitor-keys": "6.20.0",
"@typescript-eslint/scope-manager": "7.0.0",
"@typescript-eslint/type-utils": "7.0.0",
"@typescript-eslint/utils": "7.0.0",
"@typescript-eslint/visitor-keys": "7.0.0",
"debug": "^4.3.4",
"graphemer": "^1.4.0",
"ignore": "^5.2.4",
@@ -1610,7 +1610,7 @@
},
"peerDependencies": {
"@typescript-eslint/parser": "^6.0.0 || ^6.0.0-alpha",
"eslint": "^7.0.0 || ^8.0.0"
"eslint": "^8.56.0"
},
"peerDependenciesMeta": {
"typescript": {
@@ -1618,16 +1618,63 @@
}
}
},
"node_modules/@typescript-eslint/parser": {
"version": "6.20.0",
"resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-6.20.0.tgz",
"integrity": "sha512-bYerPDF/H5v6V76MdMYhjwmwgMA+jlPVqjSDq2cRqMi8bP5sR3Z+RLOiOMad3nsnmDVmn2gAFCyNgh/dIrfP/w==",
"node_modules/@typescript-eslint/eslint-plugin/node_modules/@typescript-eslint/scope-manager": {
"version": "7.0.0",
"resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-7.0.0.tgz",
"integrity": "sha512-IxTStwhNDPO07CCrYuAqjuJ3Xf5MrMaNgbAZPxFXAUpAtwqFxiuItxUaVtP/SJQeCdJjwDGh9/lMOluAndkKeg==",
"dev": true,
"dependencies": {
"@typescript-eslint/scope-manager": "6.20.0",
"@typescript-eslint/types": "6.20.0",
"@typescript-eslint/typescript-estree": "6.20.0",
"@typescript-eslint/visitor-keys": "6.20.0",
"@typescript-eslint/types": "7.0.0",
"@typescript-eslint/visitor-keys": "7.0.0"
},
"engines": {
"node": "^16.0.0 || >=18.0.0"
},
"funding": {
"type": "opencollective",
"url": "https://opencollective.com/typescript-eslint"
}
},
"node_modules/@typescript-eslint/eslint-plugin/node_modules/@typescript-eslint/types": {
"version": "7.0.0",
"resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-7.0.0.tgz",
"integrity": "sha512-9ZIJDqagK1TTs4W9IyeB2sH/s1fFhN9958ycW8NRTg1vXGzzH5PQNzq6KbsbVGMT+oyyfa17DfchHDidcmf5cg==",
"dev": true,
"engines": {
"node": "^16.0.0 || >=18.0.0"
},
"funding": {
"type": "opencollective",
"url": "https://opencollective.com/typescript-eslint"
}
},
"node_modules/@typescript-eslint/eslint-plugin/node_modules/@typescript-eslint/visitor-keys": {
"version": "7.0.0",
"resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-7.0.0.tgz",
"integrity": "sha512-JZP0uw59PRHp7sHQl3aF/lFgwOW2rgNVnXUksj1d932PMita9wFBd3621vHQRDvHwPsSY9FMAAHVc8gTvLYY4w==",
"dev": true,
"dependencies": {
"@typescript-eslint/types": "7.0.0",
"eslint-visitor-keys": "^3.4.1"
},
"engines": {
"node": "^16.0.0 || >=18.0.0"
},
"funding": {
"type": "opencollective",
"url": "https://opencollective.com/typescript-eslint"
}
},
"node_modules/@typescript-eslint/parser": {
"version": "6.21.0",
"resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-6.21.0.tgz",
"integrity": "sha512-tbsV1jPne5CkFQCgPBcDOt30ItF7aJoZL997JSF7MhGQqOeT3svWRYxiqlfA5RUdlHN6Fi+EI9bxqbdyAUZjYQ==",
"dev": true,
"dependencies": {
"@typescript-eslint/scope-manager": "6.21.0",
"@typescript-eslint/types": "6.21.0",
"@typescript-eslint/typescript-estree": "6.21.0",
"@typescript-eslint/visitor-keys": "6.21.0",
"debug": "^4.3.4"
},
"engines": {
@@ -1647,13 +1694,13 @@
}
},
"node_modules/@typescript-eslint/scope-manager": {
"version": "6.20.0",
"resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-6.20.0.tgz",
"integrity": "sha512-p4rvHQRDTI1tGGMDFQm+GtxP1ZHyAh64WANVoyEcNMpaTFn3ox/3CcgtIlELnRfKzSs/DwYlDccJEtr3O6qBvA==",
"version": "6.21.0",
"resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-6.21.0.tgz",
"integrity": "sha512-OwLUIWZJry80O99zvqXVEioyniJMa+d2GrqpUTqi5/v5D5rOrppJVBPa0yKCblcigC0/aYAzxxqQ1B+DS2RYsg==",
"dev": true,
"dependencies": {
"@typescript-eslint/types": "6.20.0",
"@typescript-eslint/visitor-keys": "6.20.0"
"@typescript-eslint/types": "6.21.0",
"@typescript-eslint/visitor-keys": "6.21.0"
},
"engines": {
"node": "^16.0.0 || >=18.0.0"
@@ -1664,13 +1711,13 @@
}
},
"node_modules/@typescript-eslint/type-utils": {
"version": "6.20.0",
"resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-6.20.0.tgz",
"integrity": "sha512-qnSobiJQb1F5JjN0YDRPHruQTrX7ICsmltXhkV536mp4idGAYrIyr47zF/JmkJtEcAVnIz4gUYJ7gOZa6SmN4g==",
"version": "7.0.0",
"resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-7.0.0.tgz",
"integrity": "sha512-FIM8HPxj1P2G7qfrpiXvbHeHypgo2mFpFGoh5I73ZlqmJOsloSa1x0ZyXCer43++P1doxCgNqIOLqmZR6SOT8g==",
"dev": true,
"dependencies": {
"@typescript-eslint/typescript-estree": "6.20.0",
"@typescript-eslint/utils": "6.20.0",
"@typescript-eslint/typescript-estree": "7.0.0",
"@typescript-eslint/utils": "7.0.0",
"debug": "^4.3.4",
"ts-api-utils": "^1.0.1"
},
@@ -1682,7 +1729,7 @@
"url": "https://opencollective.com/typescript-eslint"
},
"peerDependencies": {
"eslint": "^7.0.0 || ^8.0.0"
"eslint": "^8.56.0"
},
"peerDependenciesMeta": {
"typescript": {
@@ -1690,10 +1737,92 @@
}
}
},
"node_modules/@typescript-eslint/type-utils/node_modules/@typescript-eslint/types": {
"version": "7.0.0",
"resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-7.0.0.tgz",
"integrity": "sha512-9ZIJDqagK1TTs4W9IyeB2sH/s1fFhN9958ycW8NRTg1vXGzzH5PQNzq6KbsbVGMT+oyyfa17DfchHDidcmf5cg==",
"dev": true,
"engines": {
"node": "^16.0.0 || >=18.0.0"
},
"funding": {
"type": "opencollective",
"url": "https://opencollective.com/typescript-eslint"
}
},
"node_modules/@typescript-eslint/type-utils/node_modules/@typescript-eslint/typescript-estree": {
"version": "7.0.0",
"resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-7.0.0.tgz",
"integrity": "sha512-JzsOzhJJm74aQ3c9um/aDryHgSHfaX8SHFIu9x4Gpik/+qxLvxUylhTsO9abcNu39JIdhY2LgYrFxTii3IajLA==",
"dev": true,
"dependencies": {
"@typescript-eslint/types": "7.0.0",
"@typescript-eslint/visitor-keys": "7.0.0",
"debug": "^4.3.4",
"globby": "^11.1.0",
"is-glob": "^4.0.3",
"minimatch": "9.0.3",
"semver": "^7.5.4",
"ts-api-utils": "^1.0.1"
},
"engines": {
"node": "^16.0.0 || >=18.0.0"
},
"funding": {
"type": "opencollective",
"url": "https://opencollective.com/typescript-eslint"
},
"peerDependenciesMeta": {
"typescript": {
"optional": true
}
}
},
"node_modules/@typescript-eslint/type-utils/node_modules/@typescript-eslint/visitor-keys": {
"version": "7.0.0",
"resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-7.0.0.tgz",
"integrity": "sha512-JZP0uw59PRHp7sHQl3aF/lFgwOW2rgNVnXUksj1d932PMita9wFBd3621vHQRDvHwPsSY9FMAAHVc8gTvLYY4w==",
"dev": true,
"dependencies": {
"@typescript-eslint/types": "7.0.0",
"eslint-visitor-keys": "^3.4.1"
},
"engines": {
"node": "^16.0.0 || >=18.0.0"
},
"funding": {
"type": "opencollective",
"url": "https://opencollective.com/typescript-eslint"
}
},
"node_modules/@typescript-eslint/type-utils/node_modules/brace-expansion": {
"version": "2.0.1",
"resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz",
"integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==",
"dev": true,
"dependencies": {
"balanced-match": "^1.0.0"
}
},
"node_modules/@typescript-eslint/type-utils/node_modules/minimatch": {
"version": "9.0.3",
"resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.3.tgz",
"integrity": "sha512-RHiac9mvaRw0x3AYRgDC1CxAP7HTcNrrECeA8YYJeWnpo+2Q5CegtZjaotWTWxDG3UeGA1coE05iH1mPjT/2mg==",
"dev": true,
"dependencies": {
"brace-expansion": "^2.0.1"
},
"engines": {
"node": ">=16 || 14 >=14.17"
},
"funding": {
"url": "https://github.com/sponsors/isaacs"
}
},
"node_modules/@typescript-eslint/types": {
"version": "6.20.0",
"resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-6.20.0.tgz",
"integrity": "sha512-MM9mfZMAhiN4cOEcUOEx+0HmuaW3WBfukBZPCfwSqFnQy0grXYtngKCqpQN339X3RrwtzspWJrpbrupKYUSBXQ==",
"version": "6.21.0",
"resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-6.21.0.tgz",
"integrity": "sha512-1kFmZ1rOm5epu9NZEZm1kckCDGj5UJEf7P1kliH4LKu/RkwpsfqqGmY2OOcUs18lSlQBKLDYBOGxRVtrMN5lpg==",
"dev": true,
"engines": {
"node": "^16.0.0 || >=18.0.0"
@@ -1704,13 +1833,13 @@
}
},
"node_modules/@typescript-eslint/typescript-estree": {
"version": "6.20.0",
"resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-6.20.0.tgz",
"integrity": "sha512-RnRya9q5m6YYSpBN7IzKu9FmLcYtErkDkc8/dKv81I9QiLLtVBHrjz+Ev/crAqgMNW2FCsoZF4g2QUylMnJz+g==",
"version": "6.21.0",
"resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-6.21.0.tgz",
"integrity": "sha512-6npJTkZcO+y2/kr+z0hc4HwNfrrP4kNYh57ek7yCNlrBjWQ1Y0OS7jiZTkgumrvkX5HkEKXFZkkdFNkaW2wmUQ==",
"dev": true,
"dependencies": {
"@typescript-eslint/types": "6.20.0",
"@typescript-eslint/visitor-keys": "6.20.0",
"@typescript-eslint/types": "6.21.0",
"@typescript-eslint/visitor-keys": "6.21.0",
"debug": "^4.3.4",
"globby": "^11.1.0",
"is-glob": "^4.0.3",
@@ -1756,17 +1885,17 @@
}
},
"node_modules/@typescript-eslint/utils": {
"version": "6.20.0",
"resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-6.20.0.tgz",
"integrity": "sha512-/EKuw+kRu2vAqCoDwDCBtDRU6CTKbUmwwI7SH7AashZ+W+7o8eiyy6V2cdOqN49KsTcASWsC5QeghYuRDTyOOg==",
"version": "7.0.0",
"resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-7.0.0.tgz",
"integrity": "sha512-kuPZcPAdGcDBAyqDn/JVeJVhySvpkxzfXjJq1X1BFSTYo1TTuo4iyb937u457q4K0In84p6u2VHQGaFnv7VYqg==",
"dev": true,
"dependencies": {
"@eslint-community/eslint-utils": "^4.4.0",
"@types/json-schema": "^7.0.12",
"@types/semver": "^7.5.0",
"@typescript-eslint/scope-manager": "6.20.0",
"@typescript-eslint/types": "6.20.0",
"@typescript-eslint/typescript-estree": "6.20.0",
"@typescript-eslint/scope-manager": "7.0.0",
"@typescript-eslint/types": "7.0.0",
"@typescript-eslint/typescript-estree": "7.0.0",
"semver": "^7.5.4"
},
"engines": {
@@ -1777,16 +1906,115 @@
"url": "https://opencollective.com/typescript-eslint"
},
"peerDependencies": {
"eslint": "^7.0.0 || ^8.0.0"
"eslint": "^8.56.0"
}
},
"node_modules/@typescript-eslint/utils/node_modules/@typescript-eslint/scope-manager": {
"version": "7.0.0",
"resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-7.0.0.tgz",
"integrity": "sha512-IxTStwhNDPO07CCrYuAqjuJ3Xf5MrMaNgbAZPxFXAUpAtwqFxiuItxUaVtP/SJQeCdJjwDGh9/lMOluAndkKeg==",
"dev": true,
"dependencies": {
"@typescript-eslint/types": "7.0.0",
"@typescript-eslint/visitor-keys": "7.0.0"
},
"engines": {
"node": "^16.0.0 || >=18.0.0"
},
"funding": {
"type": "opencollective",
"url": "https://opencollective.com/typescript-eslint"
}
},
"node_modules/@typescript-eslint/utils/node_modules/@typescript-eslint/types": {
"version": "7.0.0",
"resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-7.0.0.tgz",
"integrity": "sha512-9ZIJDqagK1TTs4W9IyeB2sH/s1fFhN9958ycW8NRTg1vXGzzH5PQNzq6KbsbVGMT+oyyfa17DfchHDidcmf5cg==",
"dev": true,
"engines": {
"node": "^16.0.0 || >=18.0.0"
},
"funding": {
"type": "opencollective",
"url": "https://opencollective.com/typescript-eslint"
}
},
"node_modules/@typescript-eslint/utils/node_modules/@typescript-eslint/typescript-estree": {
"version": "7.0.0",
"resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-7.0.0.tgz",
"integrity": "sha512-JzsOzhJJm74aQ3c9um/aDryHgSHfaX8SHFIu9x4Gpik/+qxLvxUylhTsO9abcNu39JIdhY2LgYrFxTii3IajLA==",
"dev": true,
"dependencies": {
"@typescript-eslint/types": "7.0.0",
"@typescript-eslint/visitor-keys": "7.0.0",
"debug": "^4.3.4",
"globby": "^11.1.0",
"is-glob": "^4.0.3",
"minimatch": "9.0.3",
"semver": "^7.5.4",
"ts-api-utils": "^1.0.1"
},
"engines": {
"node": "^16.0.0 || >=18.0.0"
},
"funding": {
"type": "opencollective",
"url": "https://opencollective.com/typescript-eslint"
},
"peerDependenciesMeta": {
"typescript": {
"optional": true
}
}
},
"node_modules/@typescript-eslint/utils/node_modules/@typescript-eslint/visitor-keys": {
"version": "7.0.0",
"resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-7.0.0.tgz",
"integrity": "sha512-JZP0uw59PRHp7sHQl3aF/lFgwOW2rgNVnXUksj1d932PMita9wFBd3621vHQRDvHwPsSY9FMAAHVc8gTvLYY4w==",
"dev": true,
"dependencies": {
"@typescript-eslint/types": "7.0.0",
"eslint-visitor-keys": "^3.4.1"
},
"engines": {
"node": "^16.0.0 || >=18.0.0"
},
"funding": {
"type": "opencollective",
"url": "https://opencollective.com/typescript-eslint"
}
},
"node_modules/@typescript-eslint/utils/node_modules/brace-expansion": {
"version": "2.0.1",
"resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz",
"integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==",
"dev": true,
"dependencies": {
"balanced-match": "^1.0.0"
}
},
"node_modules/@typescript-eslint/utils/node_modules/minimatch": {
"version": "9.0.3",
"resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.3.tgz",
"integrity": "sha512-RHiac9mvaRw0x3AYRgDC1CxAP7HTcNrrECeA8YYJeWnpo+2Q5CegtZjaotWTWxDG3UeGA1coE05iH1mPjT/2mg==",
"dev": true,
"dependencies": {
"brace-expansion": "^2.0.1"
},
"engines": {
"node": ">=16 || 14 >=14.17"
},
"funding": {
"url": "https://github.com/sponsors/isaacs"
}
},
"node_modules/@typescript-eslint/visitor-keys": {
"version": "6.20.0",
"resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-6.20.0.tgz",
"integrity": "sha512-E8Cp98kRe4gKHjJD4NExXKz/zOJ1A2hhZc+IMVD6i7w4yjIvh6VyuRI0gRtxAsXtoC35uGMaQ9rjI2zJaXDEAw==",
"version": "6.21.0",
"resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-6.21.0.tgz",
"integrity": "sha512-JJtkDduxLi9bivAB+cYOVMtbkqdPOhZ+ZI5LC47MIRrDV4Yn2o+ZnW10Nkmr28xRpSpdJ6Sm42Hjf2+REYXm0A==",
"dev": true,
"dependencies": {
"@typescript-eslint/types": "6.20.0",
"@typescript-eslint/types": "6.21.0",
"eslint-visitor-keys": "^3.4.1"
},
"engines": {
@@ -6277,9 +6505,9 @@
}
},
"@types/jest": {
"version": "29.5.11",
"resolved": "https://registry.npmjs.org/@types/jest/-/jest-29.5.11.tgz",
"integrity": "sha512-S2mHmYIVe13vrm6q4kN6fLYYAka15ALQki/vgDC3mIukEOx8WJlv0kQPM+d4w8Gp6u0uSdKND04IlTXBv0rwnQ==",
"version": "29.5.12",
"resolved": "https://registry.npmjs.org/@types/jest/-/jest-29.5.12.tgz",
"integrity": "sha512-eDC8bTvT/QhYdxJAulQikueigY5AsdBRH2yDKW3yveW7svY3+DzN84/2NUgkw10RTiJbWqZrTtoGVdYlvFJdLw==",
"dev": true,
"requires": {
"expect": "^29.0.0",
@@ -6302,9 +6530,9 @@
}
},
"@types/semver": {
"version": "7.5.6",
"resolved": "https://registry.npmjs.org/@types/semver/-/semver-7.5.6.tgz",
"integrity": "sha512-dn1l8LaMea/IjDoHNd9J52uBbInB796CDffS6VdIxvqYCPSG0V0DzHp76GpaWnlhg88uYyPbXCDIowa86ybd5A==",
"version": "7.5.7",
"resolved": "https://registry.npmjs.org/@types/semver/-/semver-7.5.7.tgz",
"integrity": "sha512-/wdoPq1QqkSj9/QOeKkFquEuPzQbHTWAMPH/PaUMB+JuR31lXhlWXRZ52IpfDYVlDOUBvX09uBrPwxGT1hjNBg==",
"dev": true
},
"@types/stack-utils": {
@@ -6329,73 +6557,153 @@
"dev": true
},
"@typescript-eslint/eslint-plugin": {
"version": "6.20.0",
"resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-6.20.0.tgz",
"integrity": "sha512-fTwGQUnjhoYHeSF6m5pWNkzmDDdsKELYrOBxhjMrofPqCkoC2k3B2wvGHFxa1CTIqkEn88nlW1HVMztjo2K8Hg==",
"version": "7.0.0",
"resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-7.0.0.tgz",
"integrity": "sha512-M72SJ0DkcQVmmsbqlzc6EJgb/3Oz2Wdm6AyESB4YkGgCxP8u5jt5jn4/OBMPK3HLOxcttZq5xbBBU7e2By4SZQ==",
"dev": true,
"requires": {
"@eslint-community/regexpp": "^4.5.1",
"@typescript-eslint/scope-manager": "6.20.0",
"@typescript-eslint/type-utils": "6.20.0",
"@typescript-eslint/utils": "6.20.0",
"@typescript-eslint/visitor-keys": "6.20.0",
"@typescript-eslint/scope-manager": "7.0.0",
"@typescript-eslint/type-utils": "7.0.0",
"@typescript-eslint/utils": "7.0.0",
"@typescript-eslint/visitor-keys": "7.0.0",
"debug": "^4.3.4",
"graphemer": "^1.4.0",
"ignore": "^5.2.4",
"natural-compare": "^1.4.0",
"semver": "^7.5.4",
"ts-api-utils": "^1.0.1"
},
"dependencies": {
"@typescript-eslint/scope-manager": {
"version": "7.0.0",
"resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-7.0.0.tgz",
"integrity": "sha512-IxTStwhNDPO07CCrYuAqjuJ3Xf5MrMaNgbAZPxFXAUpAtwqFxiuItxUaVtP/SJQeCdJjwDGh9/lMOluAndkKeg==",
"dev": true,
"requires": {
"@typescript-eslint/types": "7.0.0",
"@typescript-eslint/visitor-keys": "7.0.0"
}
},
"@typescript-eslint/types": {
"version": "7.0.0",
"resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-7.0.0.tgz",
"integrity": "sha512-9ZIJDqagK1TTs4W9IyeB2sH/s1fFhN9958ycW8NRTg1vXGzzH5PQNzq6KbsbVGMT+oyyfa17DfchHDidcmf5cg==",
"dev": true
},
"@typescript-eslint/visitor-keys": {
"version": "7.0.0",
"resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-7.0.0.tgz",
"integrity": "sha512-JZP0uw59PRHp7sHQl3aF/lFgwOW2rgNVnXUksj1d932PMita9wFBd3621vHQRDvHwPsSY9FMAAHVc8gTvLYY4w==",
"dev": true,
"requires": {
"@typescript-eslint/types": "7.0.0",
"eslint-visitor-keys": "^3.4.1"
}
}
}
},
"@typescript-eslint/parser": {
"version": "6.20.0",
"resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-6.20.0.tgz",
"integrity": "sha512-bYerPDF/H5v6V76MdMYhjwmwgMA+jlPVqjSDq2cRqMi8bP5sR3Z+RLOiOMad3nsnmDVmn2gAFCyNgh/dIrfP/w==",
"version": "6.21.0",
"resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-6.21.0.tgz",
"integrity": "sha512-tbsV1jPne5CkFQCgPBcDOt30ItF7aJoZL997JSF7MhGQqOeT3svWRYxiqlfA5RUdlHN6Fi+EI9bxqbdyAUZjYQ==",
"dev": true,
"requires": {
"@typescript-eslint/scope-manager": "6.20.0",
"@typescript-eslint/types": "6.20.0",
"@typescript-eslint/typescript-estree": "6.20.0",
"@typescript-eslint/visitor-keys": "6.20.0",
"@typescript-eslint/scope-manager": "6.21.0",
"@typescript-eslint/types": "6.21.0",
"@typescript-eslint/typescript-estree": "6.21.0",
"@typescript-eslint/visitor-keys": "6.21.0",
"debug": "^4.3.4"
}
},
"@typescript-eslint/scope-manager": {
"version": "6.20.0",
"resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-6.20.0.tgz",
"integrity": "sha512-p4rvHQRDTI1tGGMDFQm+GtxP1ZHyAh64WANVoyEcNMpaTFn3ox/3CcgtIlELnRfKzSs/DwYlDccJEtr3O6qBvA==",
"version": "6.21.0",
"resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-6.21.0.tgz",
"integrity": "sha512-OwLUIWZJry80O99zvqXVEioyniJMa+d2GrqpUTqi5/v5D5rOrppJVBPa0yKCblcigC0/aYAzxxqQ1B+DS2RYsg==",
"dev": true,
"requires": {
"@typescript-eslint/types": "6.20.0",
"@typescript-eslint/visitor-keys": "6.20.0"
"@typescript-eslint/types": "6.21.0",
"@typescript-eslint/visitor-keys": "6.21.0"
}
},
"@typescript-eslint/type-utils": {
"version": "6.20.0",
"resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-6.20.0.tgz",
"integrity": "sha512-qnSobiJQb1F5JjN0YDRPHruQTrX7ICsmltXhkV536mp4idGAYrIyr47zF/JmkJtEcAVnIz4gUYJ7gOZa6SmN4g==",
"version": "7.0.0",
"resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-7.0.0.tgz",
"integrity": "sha512-FIM8HPxj1P2G7qfrpiXvbHeHypgo2mFpFGoh5I73ZlqmJOsloSa1x0ZyXCer43++P1doxCgNqIOLqmZR6SOT8g==",
"dev": true,
"requires": {
"@typescript-eslint/typescript-estree": "6.20.0",
"@typescript-eslint/utils": "6.20.0",
"@typescript-eslint/typescript-estree": "7.0.0",
"@typescript-eslint/utils": "7.0.0",
"debug": "^4.3.4",
"ts-api-utils": "^1.0.1"
},
"dependencies": {
"@typescript-eslint/types": {
"version": "7.0.0",
"resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-7.0.0.tgz",
"integrity": "sha512-9ZIJDqagK1TTs4W9IyeB2sH/s1fFhN9958ycW8NRTg1vXGzzH5PQNzq6KbsbVGMT+oyyfa17DfchHDidcmf5cg==",
"dev": true
},
"@typescript-eslint/typescript-estree": {
"version": "7.0.0",
"resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-7.0.0.tgz",
"integrity": "sha512-JzsOzhJJm74aQ3c9um/aDryHgSHfaX8SHFIu9x4Gpik/+qxLvxUylhTsO9abcNu39JIdhY2LgYrFxTii3IajLA==",
"dev": true,
"requires": {
"@typescript-eslint/types": "7.0.0",
"@typescript-eslint/visitor-keys": "7.0.0",
"debug": "^4.3.4",
"globby": "^11.1.0",
"is-glob": "^4.0.3",
"minimatch": "9.0.3",
"semver": "^7.5.4",
"ts-api-utils": "^1.0.1"
}
},
"@typescript-eslint/visitor-keys": {
"version": "7.0.0",
"resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-7.0.0.tgz",
"integrity": "sha512-JZP0uw59PRHp7sHQl3aF/lFgwOW2rgNVnXUksj1d932PMita9wFBd3621vHQRDvHwPsSY9FMAAHVc8gTvLYY4w==",
"dev": true,
"requires": {
"@typescript-eslint/types": "7.0.0",
"eslint-visitor-keys": "^3.4.1"
}
},
"brace-expansion": {
"version": "2.0.1",
"resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz",
"integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==",
"dev": true,
"requires": {
"balanced-match": "^1.0.0"
}
},
"minimatch": {
"version": "9.0.3",
"resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.3.tgz",
"integrity": "sha512-RHiac9mvaRw0x3AYRgDC1CxAP7HTcNrrECeA8YYJeWnpo+2Q5CegtZjaotWTWxDG3UeGA1coE05iH1mPjT/2mg==",
"dev": true,
"requires": {
"brace-expansion": "^2.0.1"
}
}
}
},
"@typescript-eslint/types": {
"version": "6.20.0",
"resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-6.20.0.tgz",
"integrity": "sha512-MM9mfZMAhiN4cOEcUOEx+0HmuaW3WBfukBZPCfwSqFnQy0grXYtngKCqpQN339X3RrwtzspWJrpbrupKYUSBXQ==",
"version": "6.21.0",
"resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-6.21.0.tgz",
"integrity": "sha512-1kFmZ1rOm5epu9NZEZm1kckCDGj5UJEf7P1kliH4LKu/RkwpsfqqGmY2OOcUs18lSlQBKLDYBOGxRVtrMN5lpg==",
"dev": true
},
"@typescript-eslint/typescript-estree": {
"version": "6.20.0",
"resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-6.20.0.tgz",
"integrity": "sha512-RnRya9q5m6YYSpBN7IzKu9FmLcYtErkDkc8/dKv81I9QiLLtVBHrjz+Ev/crAqgMNW2FCsoZF4g2QUylMnJz+g==",
"version": "6.21.0",
"resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-6.21.0.tgz",
"integrity": "sha512-6npJTkZcO+y2/kr+z0hc4HwNfrrP4kNYh57ek7yCNlrBjWQ1Y0OS7jiZTkgumrvkX5HkEKXFZkkdFNkaW2wmUQ==",
"dev": true,
"requires": {
"@typescript-eslint/types": "6.20.0",
"@typescript-eslint/visitor-keys": "6.20.0",
"@typescript-eslint/types": "6.21.0",
"@typescript-eslint/visitor-keys": "6.21.0",
"debug": "^4.3.4",
"globby": "^11.1.0",
"is-glob": "^4.0.3",
@@ -6425,27 +6733,89 @@
}
},
"@typescript-eslint/utils": {
"version": "6.20.0",
"resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-6.20.0.tgz",
"integrity": "sha512-/EKuw+kRu2vAqCoDwDCBtDRU6CTKbUmwwI7SH7AashZ+W+7o8eiyy6V2cdOqN49KsTcASWsC5QeghYuRDTyOOg==",
"version": "7.0.0",
"resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-7.0.0.tgz",
"integrity": "sha512-kuPZcPAdGcDBAyqDn/JVeJVhySvpkxzfXjJq1X1BFSTYo1TTuo4iyb937u457q4K0In84p6u2VHQGaFnv7VYqg==",
"dev": true,
"requires": {
"@eslint-community/eslint-utils": "^4.4.0",
"@types/json-schema": "^7.0.12",
"@types/semver": "^7.5.0",
"@typescript-eslint/scope-manager": "6.20.0",
"@typescript-eslint/types": "6.20.0",
"@typescript-eslint/typescript-estree": "6.20.0",
"@typescript-eslint/scope-manager": "7.0.0",
"@typescript-eslint/types": "7.0.0",
"@typescript-eslint/typescript-estree": "7.0.0",
"semver": "^7.5.4"
},
"dependencies": {
"@typescript-eslint/scope-manager": {
"version": "7.0.0",
"resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-7.0.0.tgz",
"integrity": "sha512-IxTStwhNDPO07CCrYuAqjuJ3Xf5MrMaNgbAZPxFXAUpAtwqFxiuItxUaVtP/SJQeCdJjwDGh9/lMOluAndkKeg==",
"dev": true,
"requires": {
"@typescript-eslint/types": "7.0.0",
"@typescript-eslint/visitor-keys": "7.0.0"
}
},
"@typescript-eslint/types": {
"version": "7.0.0",
"resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-7.0.0.tgz",
"integrity": "sha512-9ZIJDqagK1TTs4W9IyeB2sH/s1fFhN9958ycW8NRTg1vXGzzH5PQNzq6KbsbVGMT+oyyfa17DfchHDidcmf5cg==",
"dev": true
},
"@typescript-eslint/typescript-estree": {
"version": "7.0.0",
"resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-7.0.0.tgz",
"integrity": "sha512-JzsOzhJJm74aQ3c9um/aDryHgSHfaX8SHFIu9x4Gpik/+qxLvxUylhTsO9abcNu39JIdhY2LgYrFxTii3IajLA==",
"dev": true,
"requires": {
"@typescript-eslint/types": "7.0.0",
"@typescript-eslint/visitor-keys": "7.0.0",
"debug": "^4.3.4",
"globby": "^11.1.0",
"is-glob": "^4.0.3",
"minimatch": "9.0.3",
"semver": "^7.5.4",
"ts-api-utils": "^1.0.1"
}
},
"@typescript-eslint/visitor-keys": {
"version": "7.0.0",
"resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-7.0.0.tgz",
"integrity": "sha512-JZP0uw59PRHp7sHQl3aF/lFgwOW2rgNVnXUksj1d932PMita9wFBd3621vHQRDvHwPsSY9FMAAHVc8gTvLYY4w==",
"dev": true,
"requires": {
"@typescript-eslint/types": "7.0.0",
"eslint-visitor-keys": "^3.4.1"
}
},
"brace-expansion": {
"version": "2.0.1",
"resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz",
"integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==",
"dev": true,
"requires": {
"balanced-match": "^1.0.0"
}
},
"minimatch": {
"version": "9.0.3",
"resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.3.tgz",
"integrity": "sha512-RHiac9mvaRw0x3AYRgDC1CxAP7HTcNrrECeA8YYJeWnpo+2Q5CegtZjaotWTWxDG3UeGA1coE05iH1mPjT/2mg==",
"dev": true,
"requires": {
"brace-expansion": "^2.0.1"
}
}
}
},
"@typescript-eslint/visitor-keys": {
"version": "6.20.0",
"resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-6.20.0.tgz",
"integrity": "sha512-E8Cp98kRe4gKHjJD4NExXKz/zOJ1A2hhZc+IMVD6i7w4yjIvh6VyuRI0gRtxAsXtoC35uGMaQ9rjI2zJaXDEAw==",
"version": "6.21.0",
"resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-6.21.0.tgz",
"integrity": "sha512-JJtkDduxLi9bivAB+cYOVMtbkqdPOhZ+ZI5LC47MIRrDV4Yn2o+ZnW10Nkmr28xRpSpdJ6Sm42Hjf2+REYXm0A==",
"dev": true,
"requires": {
"@typescript-eslint/types": "6.20.0",
"@typescript-eslint/types": "6.21.0",
"eslint-visitor-keys": "^3.4.1"
}
},

View File

@@ -1,6 +1,6 @@
{
"name": "codecov-action",
"version": "4.0.0",
"version": "4.0.2",
"description": "Upload coverage reports to Codecov from GitHub Actions",
"main": "index.js",
"scripts": {
@@ -30,9 +30,9 @@
"undici": "5.28.2"
},
"devDependencies": {
"@types/jest": "^29.5.11",
"@typescript-eslint/eslint-plugin": "^6.20.0",
"@typescript-eslint/parser": "^6.20.0",
"@types/jest": "^29.5.12",
"@typescript-eslint/eslint-plugin": "^7.0.0",
"@typescript-eslint/parser": "^6.21.0",
"@vercel/ncc": "^0.38.1",
"eslint": "^8.56.0",
"eslint-config-google": "^0.14.0",

View File

@@ -12,6 +12,7 @@ const context = github.context;
test('general args', () => {
const envs = {
codecov_yml_path: 'dev/codecov.yml',
url: 'https://codecov.enterprise.com',
verbose: 't',
};
@@ -23,6 +24,8 @@ test('general args', () => {
expect(args).toEqual(
expect.arrayContaining([
'--codecov-yml-path',
'dev/codecov.yml',
'--enterprise-url',
'https://codecov.enterprise.com',
'-v',
@@ -50,25 +53,38 @@ test('upload args using context', () => {
test('upload args', () => {
const envs = {
'codecov_yml_path': 'dev/codecov.yml',
'commit_parent': 'fakeparentcommit',
'directory': 'coverage/',
'disable_file_fixes': 'true',
'disable_search': 'true',
'dry_run': 'true',
'env_vars': 'OS,PYTHON',
'exclude': 'node_modules/',
'fail_ci_if_error': 'true',
'file': 'coverage.xml',
'files': 'dir1/coverage.xml,dir2/coverage.xml',
'flags': 'test,test2',
'handle_no_reports_found': 'true',
'job_code': '32',
'name': 'codecov',
'os': 'macos',
'override_branch': 'thomasrockhu/test',
'override_build': '1',
'override_build_url': 'https://example.com/build/2',
'override_commit': '9caabca5474b49de74ef5667deabaf74cdacc244',
'override_pr': '2',
'plugin': 'xcode',
'plugins': 'pycoverage,compress-pycoverage',
'report_code': 'testCode',
'root_dir': 'root/',
'slug': 'fakeOwner/fakeRepo',
'token': 'd3859757-ab80-4664-924d-aef22fa7557b',
'url': 'https://enterprise.example.com',
'use_legacy_upload_endpoint': 'true',
'verbose': 'true',
'version': '0.1.2',
'working-directory': 'src',
'plugin': 'xcode',
'exclude': 'src',
};
for (const env of Object.keys(envs)) {
process.env['INPUT_' + env.toUpperCase()] = envs[env];
@@ -76,11 +92,13 @@ test('upload args', () => {
const {uploadExecArgs, uploadCommand} = buildUploadExec();
const expectedArgs = [
'-n',
'codecov',
'--disable-file-fixes',
'--disable-search',
'-d',
'-e',
'OS,PYTHON',
'--exclude',
'node_modules/',
'-Z',
'-f',
'coverage.xml',
@@ -92,28 +110,36 @@ test('upload args', () => {
'test',
'-F',
'test2',
'--handle-no-reports-found',
'--job-code',
'32',
'-n',
'codecov',
'-B',
'thomasrockhu/test',
'-b',
'1',
'--build-url',
'https://example.com/build/2',
'-C',
'9caabca5474b49de74ef5667deabaf74cdacc244',
'-P',
'2',
'--plugin',
'xcode',
'--plugin',
'pycoverage',
'--plugin',
'compress-pycoverage',
'--report-code',
'testCode',
'--network-root-folder',
'root/',
'-s',
'coverage/',
'-r',
'fakeOwner/fakeRepo',
'--plugin',
'xcode',
'--exclude',
'src',
'--legacy',
];
expect(uploadExecArgs).toEqual(expectedArgs);
@@ -127,8 +153,10 @@ test('upload args', () => {
test('report args', () => {
const envs = {
override_commit: '9caabca5474b49de74ef5667deabaf74cdacc244',
override_pr: 'fakePR',
slug: 'fakeOwner/fakeRepo',
token: 'd3859757-ab80-4664-924d-aef22fa7557b',
fail_ci_if_error: 'true',
};
for (const env of Object.keys(envs)) {
process.env['INPUT_' + env.toUpperCase()] = envs[env];
@@ -136,13 +164,17 @@ test('report args', () => {
const {reportExecArgs, reportCommand} = buildReportExec();
expect(reportExecArgs).toEqual(
expect.arrayContaining([
'-C',
'9caabca5474b49de74ef5667deabaf74cdacc244',
'--slug',
'fakeOwner/fakeRepo',
]));
const expectedArgs = [
'-C',
'9caabca5474b49de74ef5667deabaf74cdacc244',
'-P',
'fakePR',
'--slug',
'fakeOwner/fakeRepo',
'-Z',
];
expect(reportExecArgs).toEqual(expectedArgs);
expect(reportCommand).toEqual('create-report');
for (const env of Object.keys(envs)) {
delete process.env['INPUT_' + env.toUpperCase()];
@@ -174,32 +206,34 @@ test('report args using context', () => {
test('commit args', () => {
const envs = {
commit_parent: '83231650328f11695dfb754ca0f540516f188d27',
override_branch: 'thomasrockhu/test',
override_commit: '9caabca5474b49de74ef5667deabaf74cdacc244',
override_pr: '2',
slug: 'fakeOwner/fakeRepo',
token: 'd3859757-ab80-4664-924d-aef22fa7557b',
override_branch: 'thomasrockhu/test',
override_pr: '2',
commit_parent: '83231650328f11695dfb754ca0f540516f188d27',
fail_ci_if_error: 'true',
};
for (const env of Object.keys(envs)) {
process.env['INPUT_' + env.toUpperCase()] = envs[env];
}
const {commitExecArgs, commitCommand} = buildCommitExec();
const expectedArgs = [
'--parent-sha',
'83231650328f11695dfb754ca0f540516f188d27',
'-B',
'thomasrockhu/test',
'-C',
'9caabca5474b49de74ef5667deabaf74cdacc244',
'--pr',
'2',
'--slug',
'fakeOwner/fakeRepo',
'-Z',
];
expect(commitExecArgs).toEqual(
expect.arrayContaining([
'-C',
'9caabca5474b49de74ef5667deabaf74cdacc244',
'--slug',
'fakeOwner/fakeRepo',
'-B',
'thomasrockhu/test',
'--pr',
'2',
'--parent-sha',
'83231650328f11695dfb754ca0f540516f188d27',
]));
expect(commitExecArgs).toEqual(expectedArgs);
expect(commitCommand).toEqual('create-commit');
for (const env of Object.keys(envs)) {
delete process.env['INPUT_' + env.toUpperCase()];

View File

@@ -25,7 +25,8 @@ const buildCommitExec = () => {
const overridePr = core.getInput('override_pr');
const slug = core.getInput('slug');
const token = core.getInput('token');
const failCi = isTrue(core.getInput('fail_ci_if_error'));
const workingDir = core.getInput('working-directory');
const commitCommand = 'create-commit';
const commitExecArgs = [];
@@ -69,16 +70,26 @@ const buildCommitExec = () => {
if (slug) {
commitExecArgs.push('--slug', `${slug}`);
}
if (failCi) {
commitExecArgs.push('-Z');
}
if (workingDir) {
commitOptions.cwd = workingDir;
}
return {commitExecArgs, commitOptions, commitCommand};
};
const buildGeneralExec = () => {
const codecovYmlPath = core.getInput('codecov_yml_path');
const url = core.getInput('url');
const verbose = isTrue(core.getInput('verbose'));
const args = [];
if (codecovYmlPath) {
args.push('--codecov-yml-path', `${codecovYmlPath}`);
}
if (url) {
args.push('--enterprise-url', `${url}`);
}
@@ -90,8 +101,11 @@ const buildGeneralExec = () => {
const buildReportExec = () => {
const overrideCommit = core.getInput('override_commit');
const overridePr = core.getInput('override_pr');
const slug = core.getInput('slug');
const token = core.getInput('token');
const failCi = isTrue(core.getInput('fail_ci_if_error'));
const workingDir = core.getInput('working-directory');
const reportCommand = 'create-report';
@@ -119,35 +133,57 @@ const buildReportExec = () => {
) {
reportExecArgs.push('-C', `${context.payload.pull_request.head.sha}`);
}
if (overridePr) {
reportExecArgs.push('-P', `${overridePr}`);
} else if (
`${context.eventName}` == 'pull_request_target'
) {
reportExecArgs.push('-P', `${context.payload.number}`);
}
if (slug) {
reportExecArgs.push('--slug', `${slug}`);
}
if (failCi) {
reportExecArgs.push('-Z');
}
if (workingDir) {
reportOptions.cwd = workingDir;
}
return {reportExecArgs, reportOptions, reportCommand};
};
const buildUploadExec = () => {
const envVars = core.getInput('env_vars');
const disableFileFixes = isTrue(core.getInput('disable_file_fixes'));
const disableSearch = isTrue(core.getInput('disable_search'));
const dryRun = isTrue(core.getInput('dry_run'));
const envVars = core.getInput('env_vars');
const exclude = core.getInput('exclude');
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 handleNoReportsFound = isTrue(core.getInput('handle_no_reports_found'));
const jobCode = core.getInput('job_code');
const name = core.getInput('name');
const os = core.getInput('os');
const overrideBranch = core.getInput('override_branch');
const overrideBuild = core.getInput('override_build');
const overrideBuildUrl = core.getInput('override_build_url');
const overrideCommit = core.getInput('override_commit');
const overridePr = core.getInput('override_pr');
const plugin = core.getInput('plugin');
const plugins = core.getInput('plugins');
const reportCode = core.getInput('report_code');
const rootDir = core.getInput('root_dir');
const searchDir = core.getInput('directory');
const slug = core.getInput('slug');
const token = core.getInput('token');
let uploaderVersion = core.getInput('version');
const useLegacyUploadEndpoint = isTrue(
core.getInput('use_legacy_upload_endpoint'),
);
const workingDir = core.getInput('working-directory');
const plugin = core.getInput('plugin');
const exclude = core.getInput('exclude');
const uploadExecArgs = [];
const uploadCommand = 'do-upload';
@@ -169,21 +205,24 @@ const buildUploadExec = () => {
envVarsArg.push(envVarClean);
}
}
if (name) {
uploadExecArgs.push(
'-n',
`${name}`,
);
}
if (token) {
uploadOptions.env.CODECOV_TOKEN = token;
}
if (disableFileFixes) {
uploadExecArgs.push('--disable-file-fixes');
}
if (disableSearch) {
uploadExecArgs.push('--disable-search');
}
if (dryRun) {
uploadExecArgs.push('-d');
}
if (envVarsArg.length) {
uploadExecArgs.push('-e', envVarsArg.join(','));
}
if (exclude) {
uploadExecArgs.push('--exclude', `${exclude}`);
}
if (failCi) {
uploadExecArgs.push('-Z');
}
@@ -200,12 +239,24 @@ const buildUploadExec = () => {
uploadExecArgs.push('-F', `${f}`);
});
}
if (handleNoReportsFound) {
uploadExecArgs.push('--handle-no-reports-found');
}
if (jobCode) {
uploadExecArgs.push('--job-code', `${jobCode}`);
}
if (name) {
uploadExecArgs.push('-n', `${name}`);
}
if (overrideBranch) {
uploadExecArgs.push('-B', `${overrideBranch}`);
}
if (overrideBuild) {
uploadExecArgs.push('-b', `${overrideBuild}`);
}
if (overrideBuildUrl) {
uploadExecArgs.push('--build-url', `${overrideBuildUrl}`);
}
if (overrideCommit) {
uploadExecArgs.push('-C', `${overrideCommit}`);
} else if (
@@ -221,11 +272,17 @@ const buildUploadExec = () => {
) {
uploadExecArgs.push('-P', `${context.payload.number}`);
}
if (plugin) {
uploadExecArgs.push('--plugin', `${plugin}`);
}
if (plugins) {
plugins.split(',').map((p) => p.trim()).forEach((p) => {
uploadExecArgs.push('--plugin', `${p}`);
});
}
if (reportCode) {
uploadExecArgs.push('--report-code', `${reportCode}`);
}
if (rootDir) {
uploadExecArgs.push('--network-root-folder', `${rootDir}`);
}
@@ -238,16 +295,12 @@ const buildUploadExec = () => {
if (workingDir) {
uploadOptions.cwd = workingDir;
}
if (plugin) {
uploadExecArgs.push('--plugin', `${plugin}`);
}
if (exclude) {
uploadExecArgs.push('--exclude', `${exclude}`);
}
if (uploaderVersion == '') {
uploaderVersion = 'latest';
}
if (useLegacyUploadEndpoint) {
uploadExecArgs.push('--legacy');
}
return {
uploadExecArgs,