Compare commits
50 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 7648985a72 | |||
| ec4c4ecb5a | |||
| ffd79df3ec | |||
| a5c8752567 | |||
| 428cd7ca3d | |||
| 035df630e7 | |||
| 33f1d301f6 | |||
| 5b42a305f9 | |||
| 29c457e537 | |||
| b3ee0b08ef | |||
| 133f89a6b7 | |||
| a03d57cdbd | |||
| 1fc7722ded | |||
| 08574d831c | |||
| 0c1af46295 | |||
| f8c87eb84e | |||
| 8b988c28b0 | |||
| 4686d7034c | |||
| 4ef30f27a0 | |||
| 58cd650984 | |||
| efb844969e | |||
| c6de3f8548 | |||
| 7de43a7373 | |||
| d3e4a774c5 | |||
| 09facdbe25 | |||
| c770ad46b3 | |||
| 55dde41e2b | |||
| 11de6e2a71 | |||
| beb5a9626e | |||
| a869df4496 | |||
| a116b3286f | |||
| a6c42c7a01 | |||
| 3c9462a34c | |||
| 5155bd4dd2 | |||
| c047d5942e | |||
| d9b5cc1d8b | |||
| 0d4ed40235 | |||
| 239febf655 | |||
| 089f66bf94 | |||
| 3db8e6c626 | |||
| 97477378d5 | |||
| 5aab34a5de | |||
| 7bd0b70f4c | |||
| e1530fdc6a | |||
| 4093ac2f32 | |||
| f1824ac807 | |||
| 3fbed96f43 | |||
| 54f44cc9f4 | |||
| a74dfd1451 | |||
| 5bdef2c17a |
@@ -13,15 +13,26 @@ jobs:
|
||||
- name: Upload coverage to Codecov
|
||||
uses: ./
|
||||
with:
|
||||
files: ./coverage/calculator/coverage-final.json,./coverage/index/coverage-final.json
|
||||
fail_ci_if_error: true
|
||||
file: ./coverage/coverage-final.json
|
||||
files: ./coverage/calculator/coverage-final.json,./coverage/index/coverage-final.json
|
||||
flags: unittest
|
||||
name: codecov-1
|
||||
- name: Upload coverage to Codecov (verbose)
|
||||
uses: ./
|
||||
with:
|
||||
fail_ci_if_error: true
|
||||
file: ./coverage/coverage-final.json
|
||||
files: ./coverage/calculator/coverage-final.json,./coverage/index/coverage-final.json
|
||||
flags: unittest
|
||||
name: codecov-1
|
||||
verbose: true
|
||||
- name: Upload coverage to Codecov (working_dir)
|
||||
uses: ./
|
||||
with:
|
||||
fail_ci_if_error: true
|
||||
files: ./coverage/calculator/coverage-final.json,./coverage/index/coverage-final.json
|
||||
file: ./coverage/coverage-final.json
|
||||
flags: unittest
|
||||
name: codecov-1
|
||||
verbose: true
|
||||
working-directory: src/
|
||||
|
||||
@@ -0,0 +1,19 @@
|
||||
### 1.1.1
|
||||
|
||||
#### Fixes
|
||||
- #184 Add automations ensure proper builds and deployments
|
||||
- #184 Fixes verbose flag
|
||||
|
||||
### 1.1.0
|
||||
|
||||
#### Features
|
||||
- #110 Add "working-directory:" input
|
||||
- #174 Support Xcode specificed parameters
|
||||
|
||||
#### Fixes
|
||||
- #172 File is saved as text
|
||||
|
||||
#### Dependencies and Misc
|
||||
- #166 Bump requestretry from 4.1.1 to 4.1.2
|
||||
- #169 Bump typescript from 4.0.5 to 4.1.2
|
||||
- #178 Bump @types/jest from 26.0.15 to 26.0.19
|
||||
@@ -0,0 +1,7 @@
|
||||
deploy:
|
||||
$(eval VERSION := $(shell cat package.json | grep '"version": ' | cut -d\" -f4))
|
||||
git tag -d v1
|
||||
git push origin :v1
|
||||
git tag v1
|
||||
git tag v$(VERSION) -m ""
|
||||
git push origin --tags
|
||||
@@ -33,8 +33,6 @@ steps:
|
||||
|
||||
Codecov's Action currently supports five inputs from the user: `token`, `file`, `flags`,`name`, and `fail_ci_if_error`. These inputs, along with their descriptions and usage contexts, are listed in the table below:
|
||||
|
||||
>**Update**: We've removed the `yml` parameter with the latest release of this action. Please put your custom codecov yaml file at the root of the repo because other locations will no longer be supported in the future.
|
||||
|
||||
| Input | Description | Usage |
|
||||
| :---: | :---: | :---: |
|
||||
| `token` | Used to authorize coverage report uploads | *Required for private repos* |
|
||||
@@ -47,6 +45,9 @@ Codecov's Action currently supports five inputs from the user: `token`, `file`,
|
||||
| `fail_ci_if_error` | Specify if CI pipeline should fail when Codecov runs into errors during upload. *Defaults to **false*** | Optional
|
||||
| `path_to_write_report` | Write upload file to path before uploading | Optional
|
||||
| `verbose` | Specify whether the Codecov output should be verbose | Optional
|
||||
| `working-directory` | Directory in which to execute `codecov.sh` | Optional
|
||||
| `xcode_derived_data` | Custom Derived Data Path for Coverage.profdata and gcov processing | Optional
|
||||
| `xcode_package` | Specify packages to build coverage. Uploader will only build these packages. This can significantly reduces time to build coverage reports. -J 'MyAppName' Will match "MyAppName" and "MyAppNameTests" -J '^ExampleApp$' Will match only "ExampleApp" not "ExampleAppTests" | Optional
|
||||
|
||||
### Example `workflow.yml` with Codecov Action
|
||||
|
||||
@@ -84,7 +85,7 @@ jobs:
|
||||
env_vars: OS,PYTHON
|
||||
name: codecov-umbrella
|
||||
fail_ci_if_error: true
|
||||
path_to_write_report: ./coverage/codecov_report.gz
|
||||
path_to_write_report: ./coverage/codecov_report.txt
|
||||
verbose: true
|
||||
```
|
||||
## Contributing
|
||||
|
||||
@@ -32,6 +32,9 @@ inputs:
|
||||
verbose:
|
||||
description: 'Specify whether the Codecov output should be verbose'
|
||||
required: false
|
||||
working-directory:
|
||||
description: 'Directory in which to execute codecov.sh'
|
||||
required: false
|
||||
branding:
|
||||
color: 'red'
|
||||
icon: 'umbrella'
|
||||
|
||||
Vendored
+35
-15
@@ -2519,8 +2519,19 @@ const exec = __webpack_require__(986);
|
||||
const fs = __webpack_require__(747);
|
||||
const request = __webpack_require__(335);
|
||||
|
||||
let fail_ci;
|
||||
try {
|
||||
const isTrue = arg => {
|
||||
const lowerVar = arg.toLowerCase();
|
||||
|
||||
return (
|
||||
arg === "yes" ||
|
||||
arg === "y" ||
|
||||
arg === "true" ||
|
||||
arg === "t" ||
|
||||
arg === "1"
|
||||
) ? true : false;
|
||||
}
|
||||
|
||||
const name = core.getInput("name");
|
||||
const token = core.getInput("token");
|
||||
const flags = core.getInput("flags");
|
||||
@@ -2529,21 +2540,12 @@ try {
|
||||
const env_vars = core.getInput("env_vars");
|
||||
const dir = core.getInput("directory");
|
||||
const write_path = core.getInput("path_to_write_report");
|
||||
const verbose = core.getInput("verbose");
|
||||
const working_dir = core.getInput("working-directory");
|
||||
const xcode_derived_data = core.getInput("xcode_derived_data");
|
||||
const xcode_package = core.getInput("xcode_package");
|
||||
|
||||
fail_ci = core.getInput("fail_ci_if_error").toLowerCase();
|
||||
|
||||
if (
|
||||
fail_ci === "yes" ||
|
||||
fail_ci === "y" ||
|
||||
fail_ci === "true" ||
|
||||
fail_ci === "t" ||
|
||||
fail_ci === "1"
|
||||
) {
|
||||
fail_ci = true;
|
||||
} else {
|
||||
fail_ci = false;
|
||||
}
|
||||
const fail_ci = isTrue(core.getInput("fail_ci_if_error"));
|
||||
const verbose = isTrue(core.getInput("verbose"));
|
||||
|
||||
request({
|
||||
json: false,
|
||||
@@ -2600,6 +2602,8 @@ try {
|
||||
}
|
||||
|
||||
const execArgs = ["codecov.sh"];
|
||||
execArgs.push("-Q", "github-action");
|
||||
|
||||
if (file) {
|
||||
execArgs.push(
|
||||
"-f", `${file}`
|
||||
@@ -2649,6 +2653,22 @@ try {
|
||||
);
|
||||
}
|
||||
|
||||
if (working_dir) {
|
||||
options.cwd = working_dir;
|
||||
}
|
||||
|
||||
if (xcode_derived_data) {
|
||||
execArgs.push(
|
||||
"-D", `${xcode_derived_data}`
|
||||
);
|
||||
}
|
||||
|
||||
if (xcode_package) {
|
||||
execArgs.push(
|
||||
"-J", `${xcode_package}`
|
||||
);
|
||||
}
|
||||
|
||||
exec.exec("bash", execArgs, options)
|
||||
.catch(err => {
|
||||
if (fail_ci) {
|
||||
|
||||
Executable
+6
@@ -0,0 +1,6 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
npm i --package-lock-only
|
||||
npm run build
|
||||
git add package-lock.json
|
||||
git add dist/index.js
|
||||
@@ -3,8 +3,19 @@ const exec = require("@actions/exec");
|
||||
const fs = require("fs");
|
||||
const request = require('requestretry');
|
||||
|
||||
let fail_ci;
|
||||
try {
|
||||
const isTrue = arg => {
|
||||
const lowerVar = arg.toLowerCase();
|
||||
|
||||
return (
|
||||
arg === "yes" ||
|
||||
arg === "y" ||
|
||||
arg === "true" ||
|
||||
arg === "t" ||
|
||||
arg === "1"
|
||||
) ? true : false;
|
||||
}
|
||||
|
||||
const name = core.getInput("name");
|
||||
const token = core.getInput("token");
|
||||
const flags = core.getInput("flags");
|
||||
@@ -13,21 +24,12 @@ try {
|
||||
const env_vars = core.getInput("env_vars");
|
||||
const dir = core.getInput("directory");
|
||||
const write_path = core.getInput("path_to_write_report");
|
||||
const verbose = core.getInput("verbose");
|
||||
const working_dir = core.getInput("working-directory");
|
||||
const xcode_derived_data = core.getInput("xcode_derived_data");
|
||||
const xcode_package = core.getInput("xcode_package");
|
||||
|
||||
fail_ci = core.getInput("fail_ci_if_error").toLowerCase();
|
||||
|
||||
if (
|
||||
fail_ci === "yes" ||
|
||||
fail_ci === "y" ||
|
||||
fail_ci === "true" ||
|
||||
fail_ci === "t" ||
|
||||
fail_ci === "1"
|
||||
) {
|
||||
fail_ci = true;
|
||||
} else {
|
||||
fail_ci = false;
|
||||
}
|
||||
const fail_ci = isTrue(core.getInput("fail_ci_if_error"));
|
||||
const verbose = isTrue(core.getInput("verbose"));
|
||||
|
||||
request({
|
||||
json: false,
|
||||
@@ -84,6 +86,8 @@ try {
|
||||
}
|
||||
|
||||
const execArgs = ["codecov.sh"];
|
||||
execArgs.push("-Q", "github-action");
|
||||
|
||||
if (file) {
|
||||
execArgs.push(
|
||||
"-f", `${file}`
|
||||
@@ -133,6 +137,22 @@ try {
|
||||
);
|
||||
}
|
||||
|
||||
if (working_dir) {
|
||||
options.cwd = working_dir;
|
||||
}
|
||||
|
||||
if (xcode_derived_data) {
|
||||
execArgs.push(
|
||||
"-D", `${xcode_derived_data}`
|
||||
);
|
||||
}
|
||||
|
||||
if (xcode_package) {
|
||||
execArgs.push(
|
||||
"-J", `${xcode_package}`
|
||||
);
|
||||
}
|
||||
|
||||
exec.exec("bash", execArgs, options)
|
||||
.catch(err => {
|
||||
if (fail_ci) {
|
||||
|
||||
Executable
+12
@@ -0,0 +1,12 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
if ! [ -e .git ]; then
|
||||
echo "Please run this from repo root directory"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
cd .git/hooks
|
||||
for i in pre-commit; do
|
||||
rm -fv $i
|
||||
ln -sv ../../hooks/$i
|
||||
done
|
||||
Generated
+735
-668
File diff suppressed because it is too large
Load Diff
+6
-6
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "codecov-action",
|
||||
"version": "1.0.14",
|
||||
"version": "1.1.1",
|
||||
"description": "Upload coverage reports to Codecov from GitHub Actions",
|
||||
"main": "index.js",
|
||||
"scripts": {
|
||||
@@ -24,15 +24,15 @@
|
||||
"dependencies": {
|
||||
"@actions/core": "^1.2.6",
|
||||
"@actions/exec": "^1.0.4",
|
||||
"@types/jest": "^26.0.14",
|
||||
"@types/jest": "^26.0.19",
|
||||
"@zeit/ncc": "^0.22.3",
|
||||
"fs": "0.0.1-security",
|
||||
"jest": "^26.5.3",
|
||||
"jest": "^26.6.3",
|
||||
"jest-junit": "^12.0.0",
|
||||
"request": "^2.88.2",
|
||||
"requestretry": "^4.1.1",
|
||||
"ts-jest": "^26.4.1",
|
||||
"typescript": "^4.0.3",
|
||||
"requestretry": "^4.1.2",
|
||||
"ts-jest": "^26.4.4",
|
||||
"typescript": "^4.1.3",
|
||||
"yarn": "^1.22.10"
|
||||
},
|
||||
"devDependencies": {}
|
||||
|
||||
Reference in New Issue
Block a user