Compare commits

...

7 Commits

Author SHA1 Message Date
Thomas Hu
7de38c9dc9 Add logging 2020-08-18 22:24:45 -04:00
Thomas Hu
6145016ec0 Update name default 2020-08-18 22:16:42 -04:00
Thomas Hu
6004246f47 Merge pull request #114 from codecov/timeouts
Add more timeout tries and decrease timeout time
2020-08-17 22:13:50 -04:00
Thomas Hu
5d3f01ccdc Up the number of attempts 2020-08-17 17:14:51 -04:00
Thomas Hu
2d80980946 Add more timeouts and sharter timeout 2020-08-17 17:05:37 -04:00
Thomas Hu
fadbb25281 Merge pull request #109 from ibrahim0814/patch-1
Update action.yml with new authors
2020-08-12 13:09:38 -04:00
Ibrahim Ali
ad774549da Update action.yml with new authors
Add Thomas Hu as new author 👍
2020-08-12 00:15:12 -07:00
5 changed files with 38 additions and 9 deletions

View File

@@ -10,6 +10,11 @@ jobs:
run: npm install
- name: Run tests and collect coverage
run: yarn run test-all
- name: Echo env variables
run: |
echo $GITHUB_RUN_ID
echo $GITHUB_RUN_NUMBER
echo $GITHUB_ACTION
- name: Upload coverage to Codecov
uses: ./
with:

View File

@@ -1,9 +1,9 @@
name: 'Codecov'
description: 'GitHub Action that uploads coverage reports for your repository to codecov.io'
author: 'Ibrahim Ali <@ibrahim0814> | Codecov'
author: 'Ibrahim Ali <@ibrahim0814> & Thomas Hu <@thomasrockhu> | Codecov'
inputs:
name:
description: 'User defined upload name. Visible in Codecov UI'
description: 'User defined upload name. Visible in Codecov UI. Defaults to ${GITHUB_RUN_ID}-${GITHUB_RUN_NUMBER}'
required: false
token:
description: 'Repository upload token - get it from codecov.io. Required only for private repositories'

18
dist/index.js vendored
View File

@@ -2233,8 +2233,10 @@ try {
}
request({
url: "https://codecov.io/bash",
json: false
json: false,
maxAttempts: 10,
timeout: 3000,
url: "https://codecov.io/bash"
}, (error, response, body) => {
try {
if (error && fail_ci) {
@@ -2265,6 +2267,7 @@ try {
options.env = Object.assign(process.env, {
GITHUB_ACTION: process.env.GITHUB_ACTION,
GITHUB_RUN_ID: process.env.GITHUB_RUN_ID,
GITHUB_RUN_NUMBER: process.env.GITHUB_RUN_NUMBER,
GITHUB_REF: process.env.GITHUB_REF,
GITHUB_REPOSITORY: process.env.GITHUB_REPOSITORY,
GITHUB_SHA: process.env.GITHUB_SHA,
@@ -2305,8 +2308,17 @@ try {
);
}
if (name) {
execArgs.push(
"-n", `${name}`
);
} else {
execArgs.push(
"-n", `${GITHUB_RUN_ID}-${GITHUB_RUN_NUMBER}`
);
}
execArgs.push(
"-n", `${name}`,
"-F", `${flags}`
);

View File

@@ -29,8 +29,10 @@ try {
}
request({
url: "https://codecov.io/bash",
json: false
json: false,
maxAttempts: 10,
timeout: 3000,
url: "https://codecov.io/bash"
}, (error, response, body) => {
try {
if (error && fail_ci) {
@@ -61,6 +63,7 @@ try {
options.env = Object.assign(process.env, {
GITHUB_ACTION: process.env.GITHUB_ACTION,
GITHUB_RUN_ID: process.env.GITHUB_RUN_ID,
GITHUB_RUN_NUMBER: process.env.GITHUB_RUN_NUMBER,
GITHUB_REF: process.env.GITHUB_REF,
GITHUB_REPOSITORY: process.env.GITHUB_REPOSITORY,
GITHUB_SHA: process.env.GITHUB_SHA,
@@ -101,8 +104,17 @@ try {
);
}
if (name) {
execArgs.push(
"-n", `${name}`
);
} else {
execArgs.push(
"-n", `${GITHUB_RUN_ID}-${GITHUB_RUN_NUMBER}`
);
}
execArgs.push(
"-n", `${name}`,
"-F", `${flags}`
);

View File

@@ -1,6 +1,6 @@
{
"name": "codecov-action",
"version": "1.0.12",
"version": "1.0.14",
"description": "Upload coverage reports to Codecov from GitHub Actions",
"main": "index.js",
"scripts": {