Compare commits

..

1 Commits

Author SHA1 Message Date
Thomas Hu
66ddb8cd18 Test different on 2020-08-07 11:25:40 -04:00
5 changed files with 13 additions and 39 deletions

View File

@@ -1,5 +1,8 @@
name: Workflow for Codecov Action
on: [push, pull_request]
on:
push:
branches: master
pull_request:
jobs:
run:
runs-on: ubuntu-latest
@@ -10,11 +13,6 @@ 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> & Thomas Hu <@thomasrockhu> | Codecov'
author: 'Ibrahim Ali <@ibrahim0814> | Codecov'
inputs:
name:
description: 'User defined upload name. Visible in Codecov UI. Defaults to ${GITHUB_RUN_ID}-${GITHUB_RUN_NUMBER}'
description: 'User defined upload name. Visible in Codecov UI'
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,10 +2233,8 @@ try {
}
request({
json: false,
maxAttempts: 10,
timeout: 3000,
url: "https://codecov.io/bash"
url: "https://codecov.io/bash",
json: false
}, (error, response, body) => {
try {
if (error && fail_ci) {
@@ -2267,7 +2265,6 @@ 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,
@@ -2308,17 +2305,8 @@ 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,10 +29,8 @@ try {
}
request({
json: false,
maxAttempts: 10,
timeout: 3000,
url: "https://codecov.io/bash"
url: "https://codecov.io/bash",
json: false
}, (error, response, body) => {
try {
if (error && fail_ci) {
@@ -63,7 +61,6 @@ 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,
@@ -104,17 +101,8 @@ 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.14",
"version": "1.0.12",
"description": "Upload coverage reports to Codecov from GitHub Actions",
"main": "index.js",
"scripts": {