merge main into dana/commit-report-upload-args

This commit is contained in:
Dana 2023-08-22 10:54:47 +03:00
commit 4896f55039
No known key found for this signature in database
GPG key ID: CE3464681E428690
14 changed files with 347 additions and 113 deletions

View file

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

View file

@ -8,7 +8,7 @@ jobs:
os: [macos-latest, windows-latest, ubuntu-latest] os: [macos-latest, windows-latest, ubuntu-latest]
steps: steps:
- name: Checkout - name: Checkout
uses: actions/checkout@v3 uses: actions/checkout@v3.5.3
- name: Upload coverage to Codecov (script) - name: Upload coverage to Codecov (script)
uses: ./ uses: ./
with: with:
@ -40,7 +40,7 @@ jobs:
os: [macos-latest, windows-latest, ubuntu-latest] os: [macos-latest, windows-latest, ubuntu-latest]
steps: steps:
- name: Checkout - name: Checkout
uses: actions/checkout@v3 uses: actions/checkout@v3.5.3
- name: Install dependencies - name: Install dependencies
run: npm install run: npm install
- name: Lint - name: Lint

View file

@ -24,12 +24,12 @@ jobs:
steps: steps:
- name: "Checkout code" - name: "Checkout code"
uses: actions/checkout@a12a3943b4bdde767164f792f33f40b04645d846 # v3.0.0 uses: actions/checkout@v3.5.3 # v3.0.0
with: with:
persist-credentials: false persist-credentials: false
- name: "Run analysis" - name: "Run analysis"
uses: ossf/scorecard-action@e38b1902ae4f44df626f11ba0734b14fb91f8f86 # v2.1.2 uses: ossf/scorecard-action@08b4669551908b1024bb425080c797723083c031 # v2.2.0
with: with:
results_file: results.sarif results_file: results.sarif
results_format: sarif results_format: sarif
@ -56,6 +56,6 @@ jobs:
# Upload the results to GitHub's code scanning dashboard. # Upload the results to GitHub's code scanning dashboard.
- name: "Upload to code-scanning" - name: "Upload to code-scanning"
uses: github/codeql-action/upload-sarif@5f532563584d71fdef14ee64d17bafb34f751ce5 # v1.0.26 uses: github/codeql-action/upload-sarif@v2.21.2 # v1.0.26
with: with:
sarif_file: results.sarif sarif_file: results.sarif

View file

@ -1,3 +1,57 @@
## 3.1.4
### Fixes
- #967 Fix typo in README.md
- #971 fix: add back in working dir
- #969 fix: CLI option names for uploader
### Dependencies
- #970 build(deps-dev): bump @types/node from 18.15.12 to 18.16.3
- #979 build(deps-dev): bump @types/node from 20.1.0 to 20.1.2
- #981 build(deps-dev): bump @types/node from 20.1.2 to 20.1.4
## 3.1.3
### Fixes
- #960 fix: allow for aarch64 build
### Dependencies
- #957 build(deps-dev): bump jest-junit from 15.0.0 to 16.0.0
- #958 build(deps): bump openpgp from 5.7.0 to 5.8.0
- #959 build(deps-dev): bump @types/node from 18.15.10 to 18.15.12
## 3.1.2
### Fixes
- #718 Update README.md
- #851 Remove unsupported path_to_write_report argument
- #898 codeql-analysis.yml
- #901 Update README to contain correct information - inputs and negate feature
- #955 fix: add in all the extra arguments for uploader
### Dependencies
- #819 build(deps): bump openpgp from 5.4.0 to 5.5.0
- #835 build(deps): bump node-fetch from 3.2.4 to 3.2.10
- #840 build(deps): bump ossf/scorecard-action from 1.1.1 to 2.0.4
- #841 build(deps): bump @actions/core from 1.9.1 to 1.10.0
- #843 build(deps): bump @actions/github from 5.0.3 to 5.1.1
- #869 build(deps): bump node-fetch from 3.2.10 to 3.3.0
- #872 build(deps-dev): bump jest-junit from 13.2.0 to 15.0.0
- #879 build(deps): bump decode-uri-component from 0.2.0 to 0.2.2
- #889 build(deps): bump ossf/scorecard-action from 1.1.1 to 2.1.2
- #895 build(deps): bump json5 from 2.2.1 to 2.2.3
- #896 build(deps): bump actions/upload-artifact from 3.1.0 to 3.1.2
- #900 build(deps-dev): bump @vercel/ncc from 0.34.0 to 0.36.1
- #905 build(deps-dev): bump typescript from 4.7.4 to 4.9.5
- #911 build(deps-dev): bump @types/node from 16.11.40 to 18.13.0
- #922 build(deps-dev): bump @types/node from 18.13.0 to 18.14.0
- #924 build(deps): bump openpgp from 5.5.0 to 5.7.0
- #927 build(deps-dev): bump @types/node from 18.14.0 to 18.14.2
- #933 build(deps-dev): bump @types/node from 18.14.2 to 18.14.6
- #937 build(deps-dev): bump @types/node from 18.14.6 to 18.15.0
- #938 build(deps): bump node-fetch from 3.3.0 to 3.3.1
- #945 build(deps-dev): bump @types/node from 18.15.0 to 18.15.5
- #946 build(deps-dev): bump @types/node from 18.15.5 to 18.15.6
- #947 build(deps-dev): bump @types/node from 18.15.6 to 18.15.10
- #951 build(deps): bump ossf/scorecard-action from 2.1.2 to 2.1.3
## 3.1.1 ## 3.1.1
### Fixes ### Fixes
- #661 Update deprecation warning - #661 Update deprecation warning

View file

@ -35,7 +35,7 @@ steps:
- uses: actions/checkout@master - uses: actions/checkout@master
- uses: codecov/codecov-action@v3 - uses: codecov/codecov-action@v3
with: with:
token: ${{ secrets.CODECOV_TOKEN }} # not required for public repos token: ${{ secrets.CODECOV_TOKEN }}
files: ./coverage1.xml,./coverage2.xml # optional files: ./coverage1.xml,./coverage2.xml # optional
flags: unittests # optional flags: unittests # optional
name: codecov-umbrella # optional name: codecov-umbrella # optional
@ -50,35 +50,44 @@ Codecov's Action supports inputs from the user. These inputs, along with their d
| Input | Description | Usage | | Input | Description | Usage |
| :---: | :---: | :---: | | :---: | :---: | :---: |
| `token` | Used to authorize coverage report uploads | *Required for private repos* | | `token` | Used to authorize coverage report uploads | *Required |
| `files` | Comma-separated paths to the coverage report(s). Negated paths are supported by starting with `!` | Optional | `move_coverage_to_trash` | Move discovered coverage reports to the trash | Optional
| `directory` | Directory to search for coverage reports. | Optional
| `dry_run` | Don't upload files to Codecov | Optional
| `flags` | Flag the upload to group coverage metrics (unittests, uitests, etc.). Multiple flags are separated by a comma (ui,chrome) | 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 | `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 | `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 | `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 | `functionalities` | Toggle functionalities | Optional
| `network` | Disable uploading the file network | 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` | Run with gcov support | Optional
| `gcov_args` | Extra arguments to pass to gcov | Optional | `gcov_args` | Extra arguments to pass to gcov | Optional
| `gcov_ignore` | Paths to ignore during gcov gathering | Optional | `gcov_ignore` | Paths to ignore during gcov gathering | Optional
| `gcov_include` | Paths to include during gcov gathering | Optional | `gcov_include` | Paths to include during gcov gathering | Optional
| `move_coverage_to_trash` | Move discovered coverage reports to the trash | Optional | `gcov_executable` | gcov executable to run. Defaults to gcov. | Optional
| `name` | Custom defined name for the upload | 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_branch` | Specify the branch name | Optional
| `override_build` | Specify the build number | Optional | `override_build` | Specify the build number | Optional
| `override_commit` | Specify the commit SHA | Optional | `override_commit` | Specify the commit SHA | Optional
| `override_pr` | Specify the pull request number | Optional | `override_pr` | Specify the pull request number | Optional
| `override_tag` | Specify the git tag | Optional | `override_tag` | Specify the git tag | Optional
| `root_dir` | Used when not in git/hg project to identify project root directory | 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 | `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 | `url` | Change the upload host (Enterprise use) | Optional
| `verbose` | Specify whether the Codecov output should be verbose | 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 | `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 | `working-directory` | Directory in which to execute `codecov.sh` | Optional
| `xcode` | Run with xcode support | Optional | `xtra_args` | Add additional uploader args that may be missing in the Action | Optional
| `xcode_archive_path` | Specify the xcode archive path. Likely specified as the -resultBundlePath and should end in .xcresult | Optional
### Example `workflow.yml` with Codecov Action ### Example `workflow.yml` with Codecov Action
@ -94,13 +103,13 @@ jobs:
os: [ubuntu-latest, macos-latest, windows-latest] os: [ubuntu-latest, macos-latest, windows-latest]
env: env:
OS: ${{ matrix.os }} OS: ${{ matrix.os }}
PYTHON: '3.7' PYTHON: '3.10'
steps: steps:
- uses: actions/checkout@master - uses: actions/checkout@master
- name: Setup Python - name: Setup Python
uses: actions/setup-python@master uses: actions/setup-python@master
with: with:
python-version: 3.7 python-version: 3.10
- name: Generate coverage report - name: Generate coverage report
run: | run: |
pip install pytest pip install pytest

View file

@ -5,6 +5,9 @@ inputs:
token: token:
description: 'Repository upload token - get it from codecov.io. Required only for private repositories' description: 'Repository upload token - get it from codecov.io. Required only for private repositories'
required: false required: false
file:
description: 'Path to coverage file to upload'
required: false
files: files:
description: 'Comma-separated list of files to upload' description: 'Comma-separated list of files to upload'
required: false required: false
@ -14,6 +17,9 @@ inputs:
flags: flags:
description: 'Flag upload to group coverage metrics (e.g. unittests | integration | ui,chrome)' description: 'Flag upload to group coverage metrics (e.g. unittests | integration | ui,chrome)'
required: false required: false
full_report:
description: Specify the path of a full Codecov report to re-upload
required: false
commit_parent: commit_parent:
description: 'The commit SHA of the parent for which you are uploading coverage. If not present, the parent will be determined using the API of your repository provider. When using the repository providers API, the parent is determined via finding the closest ancestor to the commit.' description: 'The commit SHA of the parent for which you are uploading coverage. If not present, the parent will be determined using the API of your repository provider. When using the repository providers API, the parent is determined via finding the closest ancestor to the commit.'
required: false required: false
@ -26,11 +32,8 @@ inputs:
fail_ci_if_error: fail_ci_if_error:
description: 'Specify whether or not CI build should fail if Codecov runs into an error during upload' description: 'Specify whether or not CI build should fail if Codecov runs into an error during upload'
required: false required: false
file:
description: 'Path to coverage file to upload'
required: false
functionalities: functionalities:
description: 'Comma-separated list, see the README for options and their usage' description: 'Comma-separated list, see the README for options and their usage. Options include `network`, `fixes`, `search`.'
required: false required: false
gcov: gcov:
description: 'Run with gcov support' description: 'Run with gcov support'
@ -38,6 +41,9 @@ inputs:
gcov_args: gcov_args:
description: 'Extra arguments to pass to gcov' description: 'Extra arguments to pass to gcov'
required: false required: false
gcov_executable:
description: 'gcov executable to run. Defaults to gcov'
required: false
gcov_ignore: gcov_ignore:
description: 'Paths to ignore during gcov gathering' description: 'Paths to ignore during gcov gathering'
required: false required: false
@ -50,6 +56,15 @@ inputs:
name: name:
description: 'User defined upload name. Visible in Codecov UI' description: 'User defined upload name. Visible in Codecov UI'
required: false required: false
network_filter:
description: 'Specify a filter on the files listed in the network section of the Codecov report. Useful for upload-specific path fixing'
required: false
network_prefix:
description: 'Specify a prefix on files listed in the network section of the Codecov report. Useful to help resolve path fixing'
required: false
os:
description: 'Override the assumed OS. Options are aarch64 | alpine | linux | macos | windows.'
required: false
override_branch: override_branch:
description: 'Specify the branch name' description: 'Specify the branch name'
required: false required: false
@ -65,15 +80,21 @@ inputs:
override_tag: override_tag:
description: 'Specify the git tag' description: 'Specify the git tag'
required: false required: false
os:
description: 'Override the assumed OS. Options are alpine | linux | macos | windows.'
required: false
root_dir: root_dir:
description: 'Used when not in git/hg project to identify project root directory' description: 'Used when not in git/hg project to identify project root directory'
required: false required: false
slug: slug:
description: 'Specify the slug manually (Enterprise use)' description: 'Specify the slug manually (Enterprise use)'
required: false required: false
swift:
description: 'Run with swift coverage support'
required: false
swift_project:
description: 'Specify the swift project to speed up coverage conversion'
required: false
upstream_proxy:
description: 'The upstream http proxy server to connect through'
required: false
url: url:
description: 'Change the upload host (Enterprise use)' description: 'Change the upload host (Enterprise use)'
required: false required: false
@ -92,6 +113,9 @@ inputs:
xcode_archive_path: xcode_archive_path:
description: 'Specify the xcode archive path. Likely specified as the -resultBundlePath and should end in .xcresult' description: 'Specify the xcode archive path. Likely specified as the -resultBundlePath and should end in .xcresult'
required: false required: false
xtra_args:
description: 'Add additional uploader args that may be missing in the Action'
required: false
branding: branding:
color: 'red' color: 'red'
icon: 'umbrella' icon: 'umbrella'

60
dist/index.js vendored
View file

@ -22072,7 +22072,7 @@ var lib_core = __nccwpck_require__(2186);
// EXTERNAL MODULE: ./node_modules/@actions/github/lib/github.js // EXTERNAL MODULE: ./node_modules/@actions/github/lib/github.js
var github = __nccwpck_require__(5438); var github = __nccwpck_require__(5438);
;// CONCATENATED MODULE: ./package.json ;// CONCATENATED MODULE: ./package.json
const package_namespaceObject = {"i8":"3.1.1"}; const package_namespaceObject = {"i8":"3.1.4"};
;// CONCATENATED MODULE: ./src/buildExec.ts ;// CONCATENATED MODULE: ./src/buildExec.ts
@ -22089,18 +22089,22 @@ const isTrue = (variable) => {
const buildExec = () => { const buildExec = () => {
const clean = lib_core.getInput('move_coverage_to_trash'); const clean = lib_core.getInput('move_coverage_to_trash');
const commitParent = lib_core.getInput('commit_parent'); const commitParent = lib_core.getInput('commit_parent');
const envVars = lib_core.getInput('env_vars');
const dryRun = isTrue(lib_core.getInput('dry_run')); const dryRun = isTrue(lib_core.getInput('dry_run'));
const envVars = lib_core.getInput('env_vars');
const failCi = isTrue(lib_core.getInput('fail_ci_if_error')); const failCi = isTrue(lib_core.getInput('fail_ci_if_error'));
const file = lib_core.getInput('file'); const file = lib_core.getInput('file');
const files = lib_core.getInput('files'); const files = lib_core.getInput('files');
const flags = lib_core.getInput('flags'); const flags = lib_core.getInput('flags');
const fullReport = lib_core.getInput('full_report');
const functionalities = lib_core.getInput('functionalities');
const gcov = lib_core.getInput('gcov'); const gcov = lib_core.getInput('gcov');
const gcovArgs = lib_core.getInput('gcov_args'); const gcovArgs = lib_core.getInput('gcov_args');
const gcovExecutable = lib_core.getInput('gcov_executable');
const gcovIgnore = lib_core.getInput('gcov_ignore'); const gcovIgnore = lib_core.getInput('gcov_ignore');
const gcovInclude = lib_core.getInput('gcov_include'); const gcovInclude = lib_core.getInput('gcov_include');
const functionalities = lib_core.getInput('functionalities');
const name = lib_core.getInput('name'); const name = lib_core.getInput('name');
const networkFilter = lib_core.getInput('network_filter');
const networkPrefix = lib_core.getInput('network_prefix');
const os = lib_core.getInput('os'); const os = lib_core.getInput('os');
const overrideBranch = lib_core.getInput('override_branch'); const overrideBranch = lib_core.getInput('override_branch');
const overrideBuild = lib_core.getInput('override_build'); const overrideBuild = lib_core.getInput('override_build');
@ -22110,13 +22114,17 @@ const buildExec = () => {
const rootDir = lib_core.getInput('root_dir'); const rootDir = lib_core.getInput('root_dir');
const searchDir = lib_core.getInput('directory'); const searchDir = lib_core.getInput('directory');
const slug = lib_core.getInput('slug'); const slug = lib_core.getInput('slug');
const swift = lib_core.getInput('swift');
const swiftProject = lib_core.getInput('swift_project');
const token = lib_core.getInput('token'); const token = lib_core.getInput('token');
let uploaderVersion = lib_core.getInput('version'); const upstream = lib_core.getInput('upstream_proxy');
const url = lib_core.getInput('url'); const url = lib_core.getInput('url');
const verbose = isTrue(lib_core.getInput('verbose')); const verbose = isTrue(lib_core.getInput('verbose'));
const workingDir = lib_core.getInput('working-directory'); const workingDir = lib_core.getInput('working-directory');
const xcode = lib_core.getInput('xcode'); const xcode = lib_core.getInput('xcode');
const xcodeArchivePath = lib_core.getInput('xcode_archive_path'); const xcodeArchivePath = lib_core.getInput('xcode_archive_path');
const xtraArgs = lib_core.getInput('xtra_args');
let uploaderVersion = lib_core.getInput('version');
const execArgs = []; const execArgs = [];
execArgs.push('-n', `${name}`, '-Q', `github-action-${package_namespaceObject.i8}`); execArgs.push('-n', `${name}`, '-Q', `github-action-${package_namespaceObject.i8}`);
const options = {}; const options = {};
@ -22167,6 +22175,9 @@ const buildExec = () => {
execArgs.push('-f', `${f}`); execArgs.push('-f', `${f}`);
}); });
} }
if (fullReport) {
execArgs.push('--full', `${fullReport}`);
}
if (flags) { if (flags) {
flags.split(',').map((f) => f.trim()).forEach((f) => { flags.split(',').map((f) => f.trim()).forEach((f) => {
execArgs.push('-F', `${f}`); execArgs.push('-F', `${f}`);
@ -22176,13 +22187,22 @@ const buildExec = () => {
execArgs.push('-g'); execArgs.push('-g');
} }
if (gcovArgs) { if (gcovArgs) {
execArgs.push('--gcovArgs', `${gcovArgs}`); execArgs.push('--ga', `${gcovArgs}`);
} }
if (gcovIgnore) { if (gcovIgnore) {
execArgs.push('--gcovIgnore', `${gcovIgnore}`); execArgs.push('--gi', `${gcovIgnore}`);
} }
if (gcovInclude) { if (gcovInclude) {
execArgs.push('--gcovInclude', `${gcovInclude}`); execArgs.push('--gI', `${gcovInclude}`);
}
if (gcovExecutable) {
execArgs.push('--gx', `${gcovExecutable}`);
}
if (networkFilter) {
execArgs.push('-i', `${networkFilter}`);
}
if (networkPrefix) {
execArgs.push('-k', `${networkPrefix}`);
} }
if (overrideBranch) { if (overrideBranch) {
execArgs.push('-B', `${overrideBranch}`); execArgs.push('-B', `${overrideBranch}`);
@ -22215,15 +22235,21 @@ const buildExec = () => {
if (slug) { if (slug) {
execArgs.push('-r', `${slug}`); execArgs.push('-r', `${slug}`);
} }
if (swift) {
execArgs.push('--xs');
}
if (swift && swiftProject) {
execArgs.push('--xsp', `${swiftProject}`);
}
if (upstream) {
execArgs.push('-U', `${upstream}`);
}
if (url) { if (url) {
execArgs.push('-u', `${url}`); execArgs.push('-u', `${url}`);
} }
if (verbose) { if (verbose) {
execArgs.push('-v'); execArgs.push('-v');
} }
if (workingDir) {
options.cwd = workingDir;
}
if (xcode && xcodeArchivePath) { if (xcode && xcodeArchivePath) {
execArgs.push('--xc'); execArgs.push('--xc');
execArgs.push('--xp', `${xcodeArchivePath}`); execArgs.push('--xp', `${xcodeArchivePath}`);
@ -22234,6 +22260,12 @@ const buildExec = () => {
if (verbose) { if (verbose) {
console.debug({ execArgs }); console.debug({ execArgs });
} }
if (workingDir) {
options.cwd = workingDir;
}
if (xtraArgs) {
execArgs.push(`${xtraArgs}`);
}
return { execArgs, options, failCi, os, uploaderVersion, verbose }; return { execArgs, options, failCi, os, uploaderVersion, verbose };
}; };
const buildCommitExec = () => { const buildCommitExec = () => {
@ -22442,7 +22474,13 @@ const buildUploadExec = () => {
;// CONCATENATED MODULE: ./src/helpers.ts ;// CONCATENATED MODULE: ./src/helpers.ts
const PLATFORMS = ['alpine', 'linux', 'macos', 'windows']; const PLATFORMS = [
'aarch64',
'alpine',
'linux',
'macos',
'windows',
];
const setFailure = (message, failCi) => { const setFailure = (message, failCi) => {
failCi ? lib_core.setFailed(message) : lib_core.warning(message); failCi ? lib_core.setFailed(message) : lib_core.warning(message);
if (failCi) { if (failCi) {

2
dist/index.js.map vendored

File diff suppressed because one or more lines are too long

146
package-lock.json generated
View file

@ -1,30 +1,30 @@
{ {
"name": "codecov-action", "name": "codecov-action",
"version": "3.1.1", "version": "3.1.4",
"lockfileVersion": 2, "lockfileVersion": 2,
"requires": true, "requires": true,
"packages": { "packages": {
"": { "": {
"name": "codecov-action", "name": "codecov-action",
"version": "3.1.1", "version": "3.1.4",
"license": "MIT", "license": "MIT",
"dependencies": { "dependencies": {
"@actions/core": "^1.10.0", "@actions/core": "^1.10.0",
"@actions/exec": "^1.1.1", "@actions/exec": "^1.1.1",
"@actions/github": "^5.1.1", "@actions/github": "^5.1.1",
"node-fetch": "^3.3.0", "node-fetch": "^3.3.2",
"openpgp": "5.7" "openpgp": "5.9"
}, },
"devDependencies": { "devDependencies": {
"@types/jest": "^27.5.0", "@types/jest": "^27.5.0",
"@types/node": "^18.15.0", "@types/node": "^20.4.5",
"@typescript-eslint/eslint-plugin": "^4.29.2", "@typescript-eslint/eslint-plugin": "^4.29.2",
"@typescript-eslint/parser": "^4.29.2", "@typescript-eslint/parser": "^4.29.2",
"@vercel/ncc": "^0.36.1", "@vercel/ncc": "^0.36.1",
"eslint": "^7.32.0", "eslint": "^7.32.0",
"eslint-config-google": "^0.14.0", "eslint-config-google": "^0.14.0",
"jest": "^26.6.3", "jest": "^26.6.3",
"jest-junit": "^15.0.0", "jest-junit": "^16.0.0",
"ts-jest": "^26.5.6", "ts-jest": "^26.5.6",
"typescript": "^4.9.5" "typescript": "^4.9.5"
} }
@ -1329,9 +1329,9 @@
"dev": true "dev": true
}, },
"node_modules/@types/node": { "node_modules/@types/node": {
"version": "18.15.0", "version": "20.4.5",
"resolved": "https://registry.npmjs.org/@types/node/-/node-18.15.0.tgz", "resolved": "https://registry.npmjs.org/@types/node/-/node-20.4.5.tgz",
"integrity": "sha512-z6nr0TTEOBGkzLGmbypWOGnpSpSIBorEhC4L+4HeQ2iezKCi4f77kyslRwvHeNitymGQ+oFyIWGP96l/DPSV9w==", "integrity": "sha512-rt40Nk13II9JwQBdeYqmbn2Q6IVTA5uPhvSO+JVqdXw/6/4glI6oR9ezty/A9Hg5u7JH4OmYmuQ+XvjKm0Datg==",
"dev": true "dev": true
}, },
"node_modules/@types/normalize-package-data": { "node_modules/@types/normalize-package-data": {
@ -4447,9 +4447,9 @@
} }
}, },
"node_modules/jest-junit": { "node_modules/jest-junit": {
"version": "15.0.0", "version": "16.0.0",
"resolved": "https://registry.npmjs.org/jest-junit/-/jest-junit-15.0.0.tgz", "resolved": "https://registry.npmjs.org/jest-junit/-/jest-junit-16.0.0.tgz",
"integrity": "sha512-Z5sVX0Ag3HZdMUnD5DFlG+1gciIFSy7yIVPhOdGUi8YJaI9iLvvBb530gtQL2CHmv0JJeiwRZenr0VrSR7frvg==", "integrity": "sha512-A94mmw6NfJab4Fg/BlvVOUXzXgF0XIH6EmTgJ5NDPp4xoKq0Kr7sErb+4Xs9nZvu58pJojz5RFGpqnZYJTrRfQ==",
"dev": true, "dev": true,
"dependencies": { "dependencies": {
"mkdirp": "^1.0.4", "mkdirp": "^1.0.4",
@ -5311,9 +5311,9 @@
} }
}, },
"node_modules/node-fetch": { "node_modules/node-fetch": {
"version": "3.3.0", "version": "3.3.2",
"resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-3.3.0.tgz", "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-3.3.2.tgz",
"integrity": "sha512-BKwRP/O0UvoMKp7GNdwPlObhYGB5DQqwhEDQlNKuoqwVYSxkSZCSbHjnFFmUEtwSKRPU4kNK8PbDYYitwaE3QA==", "integrity": "sha512-dRB78srN/l6gqWulah9SrxeYnxeddIG30+GOqK/9OlLVyLg3HPnr6SqOWTWOXKRwC2eGYCkZ59NNuSgvSrpgOA==",
"dependencies": { "dependencies": {
"data-uri-to-buffer": "^4.0.0", "data-uri-to-buffer": "^4.0.0",
"fetch-blob": "^3.1.4", "fetch-blob": "^3.1.4",
@ -5535,9 +5535,9 @@
} }
}, },
"node_modules/openpgp": { "node_modules/openpgp": {
"version": "5.7.0", "version": "5.9.0",
"resolved": "https://registry.npmjs.org/openpgp/-/openpgp-5.7.0.tgz", "resolved": "https://registry.npmjs.org/openpgp/-/openpgp-5.9.0.tgz",
"integrity": "sha512-wchYJQfFbSaocUvUIYqNrWD+lRSmFSG1d3Ak2CHeXFocDSEsf7Uc1zUzHjSdlZPTvGeeXPQ+MJrwVtalL4QCBg==", "integrity": "sha512-wEI6TAinCAq8ZLZA4oZ3ZtJ2BhhHj+CiPCd8TzE7zCicr0V8tvG5UF76OtddLLOJcK63w3Aj3KiRd+VLMScirQ==",
"dependencies": { "dependencies": {
"asn1.js": "^5.0.0" "asn1.js": "^5.0.0"
}, },
@ -5836,6 +5836,12 @@
"node": ">=6" "node": ">=6"
} }
}, },
"node_modules/querystringify": {
"version": "2.2.0",
"resolved": "https://registry.npmjs.org/querystringify/-/querystringify-2.2.0.tgz",
"integrity": "sha512-FIqgj2EUvTa7R50u0rGsyTftzjYmv/a3hO345bZNrqabNqjtgiDMgmo4mkUjd+nzU5oF3dClKqFIPUKybUyqoQ==",
"dev": true
},
"node_modules/queue-microtask": { "node_modules/queue-microtask": {
"version": "1.2.3", "version": "1.2.3",
"resolved": "https://registry.npmjs.org/queue-microtask/-/queue-microtask-1.2.3.tgz", "resolved": "https://registry.npmjs.org/queue-microtask/-/queue-microtask-1.2.3.tgz",
@ -5985,6 +5991,12 @@
"integrity": "sha512-NKN5kMDylKuldxYLSUfrbo5Tuzh4hd+2E8NPPX02mZtn1VuREQToYe/ZdlJy+J3uCpfaiGF05e7B8W0iXbQHmg==", "integrity": "sha512-NKN5kMDylKuldxYLSUfrbo5Tuzh4hd+2E8NPPX02mZtn1VuREQToYe/ZdlJy+J3uCpfaiGF05e7B8W0iXbQHmg==",
"dev": true "dev": true
}, },
"node_modules/requires-port": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/requires-port/-/requires-port-1.0.0.tgz",
"integrity": "sha512-KigOCHcocU3XODJxsu8i/j8T9tzT4adHiecwORRQ0ZZFcp7ahwXuRU1m+yuO90C5ZUyGeGfocHDI14M3L3yDAQ==",
"dev": true
},
"node_modules/resolve": { "node_modules/resolve": {
"version": "1.22.0", "version": "1.22.0",
"resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.0.tgz", "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.0.tgz",
@ -7238,14 +7250,15 @@
} }
}, },
"node_modules/tough-cookie": { "node_modules/tough-cookie": {
"version": "4.0.0", "version": "4.1.3",
"resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-4.0.0.tgz", "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-4.1.3.tgz",
"integrity": "sha512-tHdtEpQCMrc1YLrMaqXXcj6AxhYi/xgit6mZu1+EDWUn+qhUf8wMQoFIy9NXuq23zAwtcB0t/MjACGR18pcRbg==", "integrity": "sha512-aX/y5pVRkfRnfmuX+OdbSdXvPe6ieKX/G2s7e98f4poJHnqH3281gDPm/metm6E/WRamfx7WC4HUqkWHfQHprw==",
"dev": true, "dev": true,
"dependencies": { "dependencies": {
"psl": "^1.1.33", "psl": "^1.1.33",
"punycode": "^2.1.1", "punycode": "^2.1.1",
"universalify": "^0.1.2" "universalify": "^0.2.0",
"url-parse": "^1.5.3"
}, },
"engines": { "engines": {
"node": ">=6" "node": ">=6"
@ -7405,9 +7418,9 @@
"integrity": "sha512-isyNax3wXoKaulPDZWHQqbmIx1k2tb9fb3GGDBRxCscfYV2Ch7WxPArBsFEG8s/safwXTT7H4QGhaIkTp9447w==" "integrity": "sha512-isyNax3wXoKaulPDZWHQqbmIx1k2tb9fb3GGDBRxCscfYV2Ch7WxPArBsFEG8s/safwXTT7H4QGhaIkTp9447w=="
}, },
"node_modules/universalify": { "node_modules/universalify": {
"version": "0.1.2", "version": "0.2.0",
"resolved": "https://registry.npmjs.org/universalify/-/universalify-0.1.2.tgz", "resolved": "https://registry.npmjs.org/universalify/-/universalify-0.2.0.tgz",
"integrity": "sha512-rBJeI5CXAlmy1pV+617WB9J63U6XcazHHF2f2dbJix4XzpUF0RS3Zbj0FGIOCAva5P/d/GBOYaACQ1w+0azUkg==", "integrity": "sha512-CJ1QgKmNg3CwvAv/kOFmtnEN05f0D/cn9QntgNOQlQF9dgvVTHj3t+8JPdjqawCHk7V/KA+fbUqzZ9XWhcqPUg==",
"dev": true, "dev": true,
"engines": { "engines": {
"node": ">= 4.0.0" "node": ">= 4.0.0"
@ -7477,6 +7490,16 @@
"deprecated": "Please see https://github.com/lydell/urix#deprecated", "deprecated": "Please see https://github.com/lydell/urix#deprecated",
"dev": true "dev": true
}, },
"node_modules/url-parse": {
"version": "1.5.10",
"resolved": "https://registry.npmjs.org/url-parse/-/url-parse-1.5.10.tgz",
"integrity": "sha512-WypcfiRhfeUP9vvF0j6rw0J3hrWrw6iZv3+22h6iRMJ/8z1Tj6XfLP4DsUix5MhMPnXpiHDoKyoZ/bdCkwBCiQ==",
"dev": true,
"dependencies": {
"querystringify": "^2.1.1",
"requires-port": "^1.0.0"
}
},
"node_modules/use": { "node_modules/use": {
"version": "3.1.1", "version": "3.1.1",
"resolved": "https://registry.npmjs.org/use/-/use-3.1.1.tgz", "resolved": "https://registry.npmjs.org/use/-/use-3.1.1.tgz",
@ -7631,9 +7654,9 @@
"dev": true "dev": true
}, },
"node_modules/word-wrap": { "node_modules/word-wrap": {
"version": "1.2.3", "version": "1.2.4",
"resolved": "https://registry.npmjs.org/word-wrap/-/word-wrap-1.2.3.tgz", "resolved": "https://registry.npmjs.org/word-wrap/-/word-wrap-1.2.4.tgz",
"integrity": "sha512-Hz/mrNwitNRh/HUAtM/VT/5VH+ygD6DV7mYKZAtHOrbs8U7lvPS6xf7EJKMF0uW1KJCl0H701g3ZGus+muE5vQ==", "integrity": "sha512-2V81OA4ugVo5pRo46hAoD2ivUJx8jXmWXfUkY4KFNw0hEptvN0QfH3K4nHiwzGeKl5rFKedV48QVoqYavy4YpA==",
"dev": true, "dev": true,
"engines": { "engines": {
"node": ">=0.10.0" "node": ">=0.10.0"
@ -8847,9 +8870,9 @@
"dev": true "dev": true
}, },
"@types/node": { "@types/node": {
"version": "18.15.0", "version": "20.4.5",
"resolved": "https://registry.npmjs.org/@types/node/-/node-18.15.0.tgz", "resolved": "https://registry.npmjs.org/@types/node/-/node-20.4.5.tgz",
"integrity": "sha512-z6nr0TTEOBGkzLGmbypWOGnpSpSIBorEhC4L+4HeQ2iezKCi4f77kyslRwvHeNitymGQ+oFyIWGP96l/DPSV9w==", "integrity": "sha512-rt40Nk13II9JwQBdeYqmbn2Q6IVTA5uPhvSO+JVqdXw/6/4glI6oR9ezty/A9Hg5u7JH4OmYmuQ+XvjKm0Datg==",
"dev": true "dev": true
}, },
"@types/normalize-package-data": { "@types/normalize-package-data": {
@ -11211,9 +11234,9 @@
} }
}, },
"jest-junit": { "jest-junit": {
"version": "15.0.0", "version": "16.0.0",
"resolved": "https://registry.npmjs.org/jest-junit/-/jest-junit-15.0.0.tgz", "resolved": "https://registry.npmjs.org/jest-junit/-/jest-junit-16.0.0.tgz",
"integrity": "sha512-Z5sVX0Ag3HZdMUnD5DFlG+1gciIFSy7yIVPhOdGUi8YJaI9iLvvBb530gtQL2CHmv0JJeiwRZenr0VrSR7frvg==", "integrity": "sha512-A94mmw6NfJab4Fg/BlvVOUXzXgF0XIH6EmTgJ5NDPp4xoKq0Kr7sErb+4Xs9nZvu58pJojz5RFGpqnZYJTrRfQ==",
"dev": true, "dev": true,
"requires": { "requires": {
"mkdirp": "^1.0.4", "mkdirp": "^1.0.4",
@ -11890,9 +11913,9 @@
"integrity": "sha512-/jKZoMpw0F8GRwl4/eLROPA3cfcXtLApP0QzLmUT/HuPCZWyB7IY9ZrMeKw2O/nFIqPQB3PVM9aYm0F312AXDQ==" "integrity": "sha512-/jKZoMpw0F8GRwl4/eLROPA3cfcXtLApP0QzLmUT/HuPCZWyB7IY9ZrMeKw2O/nFIqPQB3PVM9aYm0F312AXDQ=="
}, },
"node-fetch": { "node-fetch": {
"version": "3.3.0", "version": "3.3.2",
"resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-3.3.0.tgz", "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-3.3.2.tgz",
"integrity": "sha512-BKwRP/O0UvoMKp7GNdwPlObhYGB5DQqwhEDQlNKuoqwVYSxkSZCSbHjnFFmUEtwSKRPU4kNK8PbDYYitwaE3QA==", "integrity": "sha512-dRB78srN/l6gqWulah9SrxeYnxeddIG30+GOqK/9OlLVyLg3HPnr6SqOWTWOXKRwC2eGYCkZ59NNuSgvSrpgOA==",
"requires": { "requires": {
"data-uri-to-buffer": "^4.0.0", "data-uri-to-buffer": "^4.0.0",
"fetch-blob": "^3.1.4", "fetch-blob": "^3.1.4",
@ -12071,9 +12094,9 @@
} }
}, },
"openpgp": { "openpgp": {
"version": "5.7.0", "version": "5.9.0",
"resolved": "https://registry.npmjs.org/openpgp/-/openpgp-5.7.0.tgz", "resolved": "https://registry.npmjs.org/openpgp/-/openpgp-5.9.0.tgz",
"integrity": "sha512-wchYJQfFbSaocUvUIYqNrWD+lRSmFSG1d3Ak2CHeXFocDSEsf7Uc1zUzHjSdlZPTvGeeXPQ+MJrwVtalL4QCBg==", "integrity": "sha512-wEI6TAinCAq8ZLZA4oZ3ZtJ2BhhHj+CiPCd8TzE7zCicr0V8tvG5UF76OtddLLOJcK63w3Aj3KiRd+VLMScirQ==",
"requires": { "requires": {
"asn1.js": "^5.0.0" "asn1.js": "^5.0.0"
} }
@ -12287,6 +12310,12 @@
"integrity": "sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A==", "integrity": "sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A==",
"dev": true "dev": true
}, },
"querystringify": {
"version": "2.2.0",
"resolved": "https://registry.npmjs.org/querystringify/-/querystringify-2.2.0.tgz",
"integrity": "sha512-FIqgj2EUvTa7R50u0rGsyTftzjYmv/a3hO345bZNrqabNqjtgiDMgmo4mkUjd+nzU5oF3dClKqFIPUKybUyqoQ==",
"dev": true
},
"queue-microtask": { "queue-microtask": {
"version": "1.2.3", "version": "1.2.3",
"resolved": "https://registry.npmjs.org/queue-microtask/-/queue-microtask-1.2.3.tgz", "resolved": "https://registry.npmjs.org/queue-microtask/-/queue-microtask-1.2.3.tgz",
@ -12390,6 +12419,12 @@
"integrity": "sha512-NKN5kMDylKuldxYLSUfrbo5Tuzh4hd+2E8NPPX02mZtn1VuREQToYe/ZdlJy+J3uCpfaiGF05e7B8W0iXbQHmg==", "integrity": "sha512-NKN5kMDylKuldxYLSUfrbo5Tuzh4hd+2E8NPPX02mZtn1VuREQToYe/ZdlJy+J3uCpfaiGF05e7B8W0iXbQHmg==",
"dev": true "dev": true
}, },
"requires-port": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/requires-port/-/requires-port-1.0.0.tgz",
"integrity": "sha512-KigOCHcocU3XODJxsu8i/j8T9tzT4adHiecwORRQ0ZZFcp7ahwXuRU1m+yuO90C5ZUyGeGfocHDI14M3L3yDAQ==",
"dev": true
},
"resolve": { "resolve": {
"version": "1.22.0", "version": "1.22.0",
"resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.0.tgz", "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.0.tgz",
@ -13378,14 +13413,15 @@
} }
}, },
"tough-cookie": { "tough-cookie": {
"version": "4.0.0", "version": "4.1.3",
"resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-4.0.0.tgz", "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-4.1.3.tgz",
"integrity": "sha512-tHdtEpQCMrc1YLrMaqXXcj6AxhYi/xgit6mZu1+EDWUn+qhUf8wMQoFIy9NXuq23zAwtcB0t/MjACGR18pcRbg==", "integrity": "sha512-aX/y5pVRkfRnfmuX+OdbSdXvPe6ieKX/G2s7e98f4poJHnqH3281gDPm/metm6E/WRamfx7WC4HUqkWHfQHprw==",
"dev": true, "dev": true,
"requires": { "requires": {
"psl": "^1.1.33", "psl": "^1.1.33",
"punycode": "^2.1.1", "punycode": "^2.1.1",
"universalify": "^0.1.2" "universalify": "^0.2.0",
"url-parse": "^1.5.3"
} }
}, },
"tr46": { "tr46": {
@ -13497,9 +13533,9 @@
"integrity": "sha512-isyNax3wXoKaulPDZWHQqbmIx1k2tb9fb3GGDBRxCscfYV2Ch7WxPArBsFEG8s/safwXTT7H4QGhaIkTp9447w==" "integrity": "sha512-isyNax3wXoKaulPDZWHQqbmIx1k2tb9fb3GGDBRxCscfYV2Ch7WxPArBsFEG8s/safwXTT7H4QGhaIkTp9447w=="
}, },
"universalify": { "universalify": {
"version": "0.1.2", "version": "0.2.0",
"resolved": "https://registry.npmjs.org/universalify/-/universalify-0.1.2.tgz", "resolved": "https://registry.npmjs.org/universalify/-/universalify-0.2.0.tgz",
"integrity": "sha512-rBJeI5CXAlmy1pV+617WB9J63U6XcazHHF2f2dbJix4XzpUF0RS3Zbj0FGIOCAva5P/d/GBOYaACQ1w+0azUkg==", "integrity": "sha512-CJ1QgKmNg3CwvAv/kOFmtnEN05f0D/cn9QntgNOQlQF9dgvVTHj3t+8JPdjqawCHk7V/KA+fbUqzZ9XWhcqPUg==",
"dev": true "dev": true
}, },
"unset-value": { "unset-value": {
@ -13557,6 +13593,16 @@
"integrity": "sha1-2pN/emLiH+wf0Y1Js1wpNQZ6bHI=", "integrity": "sha1-2pN/emLiH+wf0Y1Js1wpNQZ6bHI=",
"dev": true "dev": true
}, },
"url-parse": {
"version": "1.5.10",
"resolved": "https://registry.npmjs.org/url-parse/-/url-parse-1.5.10.tgz",
"integrity": "sha512-WypcfiRhfeUP9vvF0j6rw0J3hrWrw6iZv3+22h6iRMJ/8z1Tj6XfLP4DsUix5MhMPnXpiHDoKyoZ/bdCkwBCiQ==",
"dev": true,
"requires": {
"querystringify": "^2.1.1",
"requires-port": "^1.0.0"
}
},
"use": { "use": {
"version": "3.1.1", "version": "3.1.1",
"resolved": "https://registry.npmjs.org/use/-/use-3.1.1.tgz", "resolved": "https://registry.npmjs.org/use/-/use-3.1.1.tgz",
@ -13683,9 +13729,9 @@
"dev": true "dev": true
}, },
"word-wrap": { "word-wrap": {
"version": "1.2.3", "version": "1.2.4",
"resolved": "https://registry.npmjs.org/word-wrap/-/word-wrap-1.2.3.tgz", "resolved": "https://registry.npmjs.org/word-wrap/-/word-wrap-1.2.4.tgz",
"integrity": "sha512-Hz/mrNwitNRh/HUAtM/VT/5VH+ygD6DV7mYKZAtHOrbs8U7lvPS6xf7EJKMF0uW1KJCl0H701g3ZGus+muE5vQ==", "integrity": "sha512-2V81OA4ugVo5pRo46hAoD2ivUJx8jXmWXfUkY4KFNw0hEptvN0QfH3K4nHiwzGeKl5rFKedV48QVoqYavy4YpA==",
"dev": true "dev": true
}, },
"wrap-ansi": { "wrap-ansi": {

View file

@ -1,6 +1,6 @@
{ {
"name": "codecov-action", "name": "codecov-action",
"version": "3.1.1", "version": "3.1.4",
"description": "Upload coverage reports to Codecov from GitHub Actions", "description": "Upload coverage reports to Codecov from GitHub Actions",
"main": "index.js", "main": "index.js",
"scripts": { "scripts": {
@ -26,19 +26,19 @@
"@actions/core": "^1.10.0", "@actions/core": "^1.10.0",
"@actions/exec": "^1.1.1", "@actions/exec": "^1.1.1",
"@actions/github": "^5.1.1", "@actions/github": "^5.1.1",
"node-fetch": "^3.3.0", "node-fetch": "^3.3.2",
"openpgp": "5.7" "openpgp": "5.9"
}, },
"devDependencies": { "devDependencies": {
"@types/jest": "^27.5.0", "@types/jest": "^27.5.0",
"@types/node": "^18.15.0", "@types/node": "^20.4.5",
"@typescript-eslint/eslint-plugin": "^4.29.2", "@typescript-eslint/eslint-plugin": "^4.29.2",
"@typescript-eslint/parser": "^4.29.2", "@typescript-eslint/parser": "^4.29.2",
"@vercel/ncc": "^0.36.1", "@vercel/ncc": "^0.36.1",
"eslint": "^7.32.0", "eslint": "^7.32.0",
"eslint-config-google": "^0.14.0", "eslint-config-google": "^0.14.0",
"jest": "^26.6.3", "jest": "^26.6.3",
"jest-junit": "^15.0.0", "jest-junit": "^16.0.0",
"ts-jest": "^26.5.6", "ts-jest": "^26.5.6",
"typescript": "^4.9.5" "typescript": "^4.9.5"
} }

View file

@ -39,27 +39,33 @@ test('all arguments', () => {
'file': 'coverage.xml', 'file': 'coverage.xml',
'files': 'dir1/coverage.xml,dir2/coverage.xml', 'files': 'dir1/coverage.xml,dir2/coverage.xml',
'flags': 'test,test2', 'flags': 'test,test2',
'functionalities': 'functionalities': 'network',
'network', 'full_report': 'oldDir/oldReport.json',
'gcov': 'true', 'gcov': 'true',
'gcov_args': '-v', 'gcov_args': '-v',
'gcov_ignore': '*.fake', 'gcov_ignore': '*.fake',
'gcov_include': 'real_file', 'gcov_include': 'real_file',
'gcov_executable': 'gcov2',
'move_coverage_to_trash': 'true', 'move_coverage_to_trash': 'true',
'name': 'codecov', 'name': 'codecov',
'network_filter': 'src/',
'network_prefix': 'build/',
'override_branch': 'thomasrockhu/test', 'override_branch': 'thomasrockhu/test',
'override_build': '1', 'override_build': '1',
'override_commit': '9caabca5474b49de74ef5667deabaf74cdacc244', 'override_commit': '9caabca5474b49de74ef5667deabaf74cdacc244',
'override_pr': '2', 'override_pr': '2',
'override_tag': 'v1.2', 'override_tag': 'v1.2',
'root_dir': 'root/', 'root_dir': 'root/',
'swift': 'true',
'swift_project': 'MyApp',
'slug': 'fakeOwner/fakeRepo', 'slug': 'fakeOwner/fakeRepo',
'token': 'd3859757-ab80-4664-924d-aef22fa7557b', 'token': 'd3859757-ab80-4664-924d-aef22fa7557b',
'upstream_proxy': 'https://codecov.example.com',
'url': 'https://codecov.enterprise.com', 'url': 'https://codecov.enterprise.com',
'verbose': 't', 'verbose': 't',
'working-directory': 'src',
'xcode': 'true', 'xcode': 'true',
'xcode_archive_path': '/test.xcresult', 'xcode_archive_path': '/test.xcresult',
'xtra_args': '--some --other --args',
}; };
for (const env of Object.keys(envs)) { for (const env of Object.keys(envs)) {
@ -87,17 +93,25 @@ test('all arguments', () => {
'dir1/coverage.xml', 'dir1/coverage.xml',
'-f', '-f',
'dir2/coverage.xml', 'dir2/coverage.xml',
'--full',
'oldDir/oldReport.json',
'-F', '-F',
'test', 'test',
'-F', '-F',
'test2', 'test2',
'-g', '-g',
'--gcovArgs', '--ga',
'-v', '-v',
'--gcovIgnore', '--gi',
'*.fake', '*.fake',
'--gcovInclude', '--gI',
'real_file', 'real_file',
'--gx',
'gcov2',
'-i',
'src/',
'-k',
'build/',
'-B', '-B',
'thomasrockhu/test', 'thomasrockhu/test',
'-b', '-b',
@ -114,12 +128,18 @@ test('all arguments', () => {
'coverage/', 'coverage/',
'-r', '-r',
'fakeOwner/fakeRepo', 'fakeOwner/fakeRepo',
'--xs',
'--xsp',
'MyApp',
'-U',
'https://codecov.example.com',
'-u', '-u',
'https://codecov.enterprise.com', 'https://codecov.enterprise.com',
'-v', '-v',
'--xc', '--xc',
'--xp', '--xp',
'/test.xcresult', '/test.xcresult',
'--some --other --args',
]); ]);
expect(failCi).toBeTruthy(); expect(failCi).toBeTruthy();

View file

@ -19,18 +19,22 @@ const isTrue = (variable) => {
const buildExec = () => { const buildExec = () => {
const clean = core.getInput('move_coverage_to_trash'); const clean = core.getInput('move_coverage_to_trash');
const commitParent = core.getInput('commit_parent'); const commitParent = core.getInput('commit_parent');
const envVars = core.getInput('env_vars');
const dryRun = isTrue(core.getInput('dry_run')); const dryRun = isTrue(core.getInput('dry_run'));
const envVars = core.getInput('env_vars');
const failCi = isTrue(core.getInput('fail_ci_if_error')); const failCi = isTrue(core.getInput('fail_ci_if_error'));
const file = core.getInput('file'); const file = core.getInput('file');
const files = core.getInput('files'); const files = core.getInput('files');
const flags = core.getInput('flags'); const flags = core.getInput('flags');
const fullReport = core.getInput('full_report');
const functionalities = core.getInput('functionalities');
const gcov = core.getInput('gcov'); const gcov = core.getInput('gcov');
const gcovArgs = core.getInput('gcov_args'); const gcovArgs = core.getInput('gcov_args');
const gcovExecutable = core.getInput('gcov_executable');
const gcovIgnore = core.getInput('gcov_ignore'); const gcovIgnore = core.getInput('gcov_ignore');
const gcovInclude = core.getInput('gcov_include'); const gcovInclude = core.getInput('gcov_include');
const functionalities = core.getInput('functionalities');
const name = core.getInput('name'); const name = core.getInput('name');
const networkFilter = core.getInput('network_filter');
const networkPrefix = core.getInput('network_prefix');
const os = core.getInput('os'); const os = core.getInput('os');
const overrideBranch = core.getInput('override_branch'); const overrideBranch = core.getInput('override_branch');
const overrideBuild = core.getInput('override_build'); const overrideBuild = core.getInput('override_build');
@ -40,13 +44,17 @@ const buildExec = () => {
const rootDir = core.getInput('root_dir'); const rootDir = core.getInput('root_dir');
const searchDir = core.getInput('directory'); const searchDir = core.getInput('directory');
const slug = core.getInput('slug'); const slug = core.getInput('slug');
const swift = core.getInput('swift');
const swiftProject = core.getInput('swift_project');
const token = core.getInput('token'); const token = core.getInput('token');
let uploaderVersion = core.getInput('version'); const upstream = core.getInput('upstream_proxy');
const url = core.getInput('url'); const url = core.getInput('url');
const verbose = isTrue(core.getInput('verbose')); const verbose = isTrue(core.getInput('verbose'));
const workingDir = core.getInput('working-directory'); const workingDir = core.getInput('working-directory');
const xcode = core.getInput('xcode'); const xcode = core.getInput('xcode');
const xcodeArchivePath = core.getInput('xcode_archive_path'); const xcodeArchivePath = core.getInput('xcode_archive_path');
const xtraArgs = core.getInput('xtra_args');
let uploaderVersion = core.getInput('version');
const execArgs = []; const execArgs = [];
execArgs.push( execArgs.push(
@ -106,6 +114,9 @@ const buildExec = () => {
execArgs.push('-f', `${f}`); execArgs.push('-f', `${f}`);
}); });
} }
if (fullReport) {
execArgs.push('--full', `${fullReport}`);
}
if (flags) { if (flags) {
flags.split(',').map((f) => f.trim()).forEach((f) => { flags.split(',').map((f) => f.trim()).forEach((f) => {
execArgs.push('-F', `${f}`); execArgs.push('-F', `${f}`);
@ -116,13 +127,23 @@ const buildExec = () => {
execArgs.push('-g'); execArgs.push('-g');
} }
if (gcovArgs) { if (gcovArgs) {
execArgs.push('--gcovArgs', `${gcovArgs}`); execArgs.push('--ga', `${gcovArgs}`);
} }
if (gcovIgnore) { if (gcovIgnore) {
execArgs.push('--gcovIgnore', `${gcovIgnore}`); execArgs.push('--gi', `${gcovIgnore}`);
} }
if (gcovInclude) { if (gcovInclude) {
execArgs.push('--gcovInclude', `${gcovInclude}`); execArgs.push('--gI', `${gcovInclude}`);
}
if (gcovExecutable) {
execArgs.push('--gx', `${gcovExecutable}`);
}
if (networkFilter) {
execArgs.push('-i', `${networkFilter}`);
}
if (networkPrefix) {
execArgs.push('-k', `${networkPrefix}`);
} }
if (overrideBranch) { if (overrideBranch) {
@ -158,15 +179,21 @@ const buildExec = () => {
if (slug) { if (slug) {
execArgs.push('-r', `${slug}`); execArgs.push('-r', `${slug}`);
} }
if (swift) {
execArgs.push('--xs');
}
if (swift && swiftProject) {
execArgs.push('--xsp', `${swiftProject}`);
}
if (upstream) {
execArgs.push('-U', `${upstream}`);
}
if (url) { if (url) {
execArgs.push('-u', `${url}`); execArgs.push('-u', `${url}`);
} }
if (verbose) { if (verbose) {
execArgs.push('-v'); execArgs.push('-v');
} }
if (workingDir) {
options.cwd = workingDir;
}
if (xcode && xcodeArchivePath) { if (xcode && xcodeArchivePath) {
execArgs.push('--xc'); execArgs.push('--xc');
execArgs.push('--xp', `${xcodeArchivePath}`); execArgs.push('--xp', `${xcodeArchivePath}`);
@ -180,6 +207,14 @@ const buildExec = () => {
console.debug({execArgs}); console.debug({execArgs});
} }
if (workingDir) {
options.cwd = workingDir;
}
if (xtraArgs) {
execArgs.push(`${xtraArgs}`);
}
return {execArgs, options, failCi, os, uploaderVersion, verbose}; return {execArgs, options, failCi, os, uploaderVersion, verbose};
}; };

View file

@ -39,6 +39,7 @@ test('getBaseUrl', () => {
expect(PLATFORMS.map((platform) => { expect(PLATFORMS.map((platform) => {
return getBaseUrl(platform, 'latest'); return getBaseUrl(platform, 'latest');
})).toEqual([ })).toEqual([
'https://uploader.codecov.io/latest/aarch64/codecov',
'https://uploader.codecov.io/latest/alpine/codecov', 'https://uploader.codecov.io/latest/alpine/codecov',
'https://uploader.codecov.io/latest/linux/codecov', 'https://uploader.codecov.io/latest/linux/codecov',
'https://uploader.codecov.io/latest/macos/codecov', 'https://uploader.codecov.io/latest/macos/codecov',
@ -48,6 +49,7 @@ test('getBaseUrl', () => {
expect(PLATFORMS.map((platform) => { expect(PLATFORMS.map((platform) => {
return getBaseUrl(platform, 'v0.1.0_8880'); return getBaseUrl(platform, 'v0.1.0_8880');
})).toEqual([ })).toEqual([
'https://uploader.codecov.io/v0.1.0_8880/aarch64/codecov',
'https://uploader.codecov.io/v0.1.0_8880/alpine/codecov', 'https://uploader.codecov.io/v0.1.0_8880/alpine/codecov',
'https://uploader.codecov.io/v0.1.0_8880/linux/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/macos/codecov',
@ -58,13 +60,13 @@ test('getBaseUrl', () => {
test('isWindows', () => { test('isWindows', () => {
expect(PLATFORMS.map((platform) => { expect(PLATFORMS.map((platform) => {
return isWindows(platform); return isWindows(platform);
})).toEqual([false, false, false, true]); })).toEqual([false, false, false, false, true]);
}); });
test('isValidPlatform', () => { test('isValidPlatform', () => {
expect(PLATFORMS.map((platform) => { expect(PLATFORMS.map((platform) => {
return isValidPlatform(platform); return isValidPlatform(platform);
})).toEqual([true, true, true, true]); })).toEqual([true, true, true, true, true]);
expect(isValidPlatform('fakeos')).toBeFalsy(); expect(isValidPlatform('fakeos')).toBeFalsy();
}); });

View file

@ -1,6 +1,12 @@
import * as core from '@actions/core'; import * as core from '@actions/core';
const PLATFORMS = ['alpine', 'linux', 'macos', 'windows']; const PLATFORMS = [
'aarch64',
'alpine',
'linux',
'macos',
'windows',
];
const setFailure = (message: string, failCi: boolean): void => { const setFailure = (message: string, failCi: boolean): void => {
failCi ? core.setFailed(message) : core.warning(message); failCi ? core.setFailed(message) : core.warning(message);