Compare commits
31
Commits
v1.0.2
...
node-action
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
e6cea4aaed | ||
|
|
70f2402e00 | ||
|
|
e6af53269a | ||
|
|
7ab923356b | ||
|
|
8676a5a946 | ||
|
|
6afe2e0d90 | ||
|
|
67a2282699 | ||
|
|
e1a57b8a47 | ||
|
|
1be0517b99 | ||
|
|
889584d6f9 | ||
|
|
c4ca0425e1 | ||
|
|
8d062b28e1 | ||
|
|
a3ae14ab33 | ||
|
|
1259587051 | ||
|
|
dd61d9f90b | ||
|
|
6e83ad2f33 | ||
|
|
747c905e39 | ||
|
|
29e36a5e71 | ||
|
|
f0ee262b3a | ||
|
|
bab0bf56a8 | ||
|
|
efc5cbe89b | ||
|
|
3d61f3d4c8 | ||
|
|
db0171f588 | ||
|
|
7ba41fc0d6 | ||
|
|
d5749ba79a | ||
|
|
b4c0b83601 | ||
|
|
3cde50f4f1 | ||
|
|
10e590a5de | ||
|
|
af19dcb193 | ||
|
|
77e74f257f | ||
|
|
1c4a4261fa |
@@ -21,4 +21,3 @@ jobs:
|
|||||||
token: ${{secrets.CODECOV_TOKEN}}
|
token: ${{secrets.CODECOV_TOKEN}}
|
||||||
flags: unittest
|
flags: unittest
|
||||||
name: codecov-1
|
name: codecov-1
|
||||||
#badstuff: morebadstuff
|
|
||||||
|
|||||||
+92
@@ -0,0 +1,92 @@
|
|||||||
|
### Node ###
|
||||||
|
# Logs
|
||||||
|
logs
|
||||||
|
*.log
|
||||||
|
npm-debug.log*
|
||||||
|
yarn-debug.log*
|
||||||
|
yarn-error.log*
|
||||||
|
lerna-debug.log*
|
||||||
|
|
||||||
|
# Diagnostic reports (https://nodejs.org/api/report.html)
|
||||||
|
report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json
|
||||||
|
|
||||||
|
# Runtime data
|
||||||
|
pids
|
||||||
|
*.pid
|
||||||
|
*.seed
|
||||||
|
*.pid.lock
|
||||||
|
|
||||||
|
# Directory for instrumented libs generated by jscoverage/JSCover
|
||||||
|
lib-cov
|
||||||
|
|
||||||
|
# Coverage directory used by tools like istanbul
|
||||||
|
coverage
|
||||||
|
*.lcov
|
||||||
|
|
||||||
|
# nyc test coverage
|
||||||
|
.nyc_output
|
||||||
|
|
||||||
|
# Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files)
|
||||||
|
.grunt
|
||||||
|
|
||||||
|
# Bower dependency directory (https://bower.io/)
|
||||||
|
bower_components
|
||||||
|
|
||||||
|
# node-waf configuration
|
||||||
|
.lock-wscript
|
||||||
|
|
||||||
|
# Compiled binary addons (https://nodejs.org/api/addons.html)
|
||||||
|
build/Release
|
||||||
|
|
||||||
|
# Dependency directories
|
||||||
|
node_modules/
|
||||||
|
jspm_packages/
|
||||||
|
|
||||||
|
# TypeScript v1 declaration files
|
||||||
|
typings/
|
||||||
|
|
||||||
|
# TypeScript cache
|
||||||
|
*.tsbuildinfo
|
||||||
|
|
||||||
|
# Optional npm cache directory
|
||||||
|
.npm
|
||||||
|
|
||||||
|
# Optional eslint cache
|
||||||
|
.eslintcache
|
||||||
|
|
||||||
|
# Optional REPL history
|
||||||
|
.node_repl_history
|
||||||
|
|
||||||
|
# Output of 'npm pack'
|
||||||
|
*.tgz
|
||||||
|
|
||||||
|
# Yarn Integrity file
|
||||||
|
.yarn-integrity
|
||||||
|
|
||||||
|
# dotenv environment variables file
|
||||||
|
.env
|
||||||
|
.env.test
|
||||||
|
|
||||||
|
# parcel-bundler cache (https://parceljs.org/)
|
||||||
|
.cache
|
||||||
|
|
||||||
|
# next.js build output
|
||||||
|
.next
|
||||||
|
|
||||||
|
# nuxt.js build output
|
||||||
|
.nuxt
|
||||||
|
|
||||||
|
# react / gatsby
|
||||||
|
public/
|
||||||
|
|
||||||
|
# vuepress build output
|
||||||
|
.vuepress/dist
|
||||||
|
|
||||||
|
# Serverless directories
|
||||||
|
.serverless/
|
||||||
|
|
||||||
|
# FuseBox cache
|
||||||
|
.fusebox/
|
||||||
|
|
||||||
|
# DynamoDB Local files
|
||||||
|
.dynamodb/
|
||||||
+3
-3
File diff suppressed because one or more lines are too long
-12
@@ -1,12 +0,0 @@
|
|||||||
# Codecov @codecov
|
|
||||||
|
|
||||||
FROM ubuntu:latest
|
|
||||||
|
|
||||||
WORKDIR /app
|
|
||||||
COPY . /app
|
|
||||||
|
|
||||||
RUN apt update && apt install -y curl git mercurial
|
|
||||||
|
|
||||||
RUN chmod +x /app/entrypoint.sh
|
|
||||||
|
|
||||||
ENTRYPOINT [ "/app/entrypoint.sh" ]
|
|
||||||
+6
-8
@@ -7,22 +7,20 @@ inputs:
|
|||||||
required: false
|
required: false
|
||||||
token:
|
token:
|
||||||
description: 'Repository upload token - get it from codecov.io'
|
description: 'Repository upload token - get it from codecov.io'
|
||||||
required: false
|
required: true
|
||||||
file:
|
file:
|
||||||
description: 'Path to coverage file to upload'
|
description: 'Path to coverage file to upload'
|
||||||
required: false
|
required: false
|
||||||
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
|
||||||
|
yml:
|
||||||
|
description: 'Specify the location of the .codecov.yml config file'
|
||||||
|
required: false
|
||||||
branding:
|
branding:
|
||||||
color: 'red'
|
color: 'red'
|
||||||
icon: 'umbrella'
|
icon: 'umbrella'
|
||||||
runs:
|
runs:
|
||||||
using: 'docker'
|
using: 'node12'
|
||||||
image: 'Dockerfile'
|
main: 'dist/index.js'
|
||||||
args:
|
|
||||||
- ${{ inputs.name }}
|
|
||||||
- ${{ inputs.token }}
|
|
||||||
- ${{ inputs.file }}
|
|
||||||
- ${{ inputs.flags }}
|
|
||||||
|
|
||||||
Vendored
+33647
File diff suppressed because one or more lines are too long
@@ -1,38 +0,0 @@
|
|||||||
#!/bin/bash
|
|
||||||
|
|
||||||
# Codecov @codecov
|
|
||||||
|
|
||||||
set -eu
|
|
||||||
|
|
||||||
if [ $# -eq 0 ]
|
|
||||||
then
|
|
||||||
echo "Please provide an upload token from codecov.io"
|
|
||||||
exit 1
|
|
||||||
elif [ "x$INPUT_TOKEN" != "x" ] && [ "x$INPUT_FILE" != "x" ] && [ "x$INPUT_FLAGS" != "x" ] && [ "x$INPUT_NAME" != "x" ]
|
|
||||||
then
|
|
||||||
curl -s https://codecov.io/bash | bash -s -- -t $INPUT_TOKEN -f $INPUT_FILE -F $INPUT_FLAGS -n $INPUT_NAME
|
|
||||||
elif [ "x$INPUT_TOKEN" != "x" ] && [ "x$INPUT_FILE" != "x" ] && [ "x$INPUT_FLAGS" != "x" ]
|
|
||||||
then
|
|
||||||
curl -s https://codecov.io/bash | bash -s -- -t $INPUT_TOKEN -f $INPUT_FILE -F $INPUT_FLAGS
|
|
||||||
elif [ "x$INPUT_TOKEN" != "x" ] && [ "x$INPUT_FILE" != "x" ] && [ "x$INPUT_NAME" != "x" ]
|
|
||||||
then
|
|
||||||
curl -s https://codecov.io/bash | bash -s -- -t $INPUT_TOKEN -f $INPUT_FILE -n $INPUT_NAME
|
|
||||||
elif [ "x$INPUT_TOKEN" != "x" ] && [ "x$INPUT_NAME" != "x" ] && [ "x$INPUT_FLAGS" != "x" ]
|
|
||||||
then
|
|
||||||
curl -s https://codecov.io/bash | bash -s -- -t $INPUT_TOKEN -n $INPUT_NAME -F $INPUT_FLAGS
|
|
||||||
elif [ "x$INPUT_TOKEN" != "x" ] && [ "x$INPUT_FILE" != "x" ]
|
|
||||||
then
|
|
||||||
curl -s https://codecov.io/bash | bash -s -- -t $INPUT_TOKEN -f $INPUT_FILE
|
|
||||||
elif [ "x$INPUT_TOKEN" != "x" ] && [ "x$INPUT_FLAGS" != "x" ]
|
|
||||||
then
|
|
||||||
curl -s https://codecov.io/bash | bash -s -- -t $INPUT_TOKEN -F $INPUT_FLAGS
|
|
||||||
elif [ "x$INPUT_TOKEN" != "x" ] && [ "x$INPUT_NAME" != "x" ]
|
|
||||||
then
|
|
||||||
curl -s https://codecov.io/bash | bash -s -- -t $INPUT_TOKEN -n $INPUT_NAME
|
|
||||||
elif [ "x$INPUT_TOKEN" != "x" ]
|
|
||||||
then
|
|
||||||
curl -s https://codecov.io/bash | bash -s -- -t $INPUT_TOKEN
|
|
||||||
else
|
|
||||||
echo "Please provide an upload token from codecov.io with valid arguments"
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
@@ -0,0 +1,72 @@
|
|||||||
|
const core = require("@actions/core");
|
||||||
|
const exec = require("@actions/exec");
|
||||||
|
const request = require("request");
|
||||||
|
const fs = require("fs");
|
||||||
|
|
||||||
|
try {
|
||||||
|
|
||||||
|
const name = core.getInput("name");
|
||||||
|
const token = core.getInput("token");
|
||||||
|
const flags = core.getInput("flags");
|
||||||
|
const file = core.getInput("file");
|
||||||
|
const yml = core.getInput("yml");
|
||||||
|
|
||||||
|
request("https://codecov.io/bash", (error, response, body) => {
|
||||||
|
if (error) throw error;
|
||||||
|
|
||||||
|
fs.writeFile("codecov.sh", body, err => {
|
||||||
|
if (err) throw err;
|
||||||
|
|
||||||
|
let output = "";
|
||||||
|
let execError = "";
|
||||||
|
const options = {};
|
||||||
|
options.listeners = {
|
||||||
|
stdout: data => {
|
||||||
|
output += data.toString();
|
||||||
|
},
|
||||||
|
stderr: data => {
|
||||||
|
execError += data.toString();
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
options.env = {
|
||||||
|
CODECOV_TOKEN: `${token}`,
|
||||||
|
GITHUB_ACTION: process.env.GITHUB_ACTION,
|
||||||
|
GITHUB_REF: process.env.GITHUB_REF,
|
||||||
|
GITHUB_REPOSITORY: process.env.GITHUB_REPOSITORY,
|
||||||
|
GITHUB_SHA: process.env.GITHUB_SHA
|
||||||
|
};
|
||||||
|
|
||||||
|
if (file) {
|
||||||
|
exec
|
||||||
|
.exec(
|
||||||
|
"bash",
|
||||||
|
["codecov.sh", "-f", `${file}`, "-n", `${name}`, "-F", `${flags}`, '-y', `${yml}`],
|
||||||
|
options
|
||||||
|
)
|
||||||
|
.then(() => {
|
||||||
|
unlinkFile()
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
exec
|
||||||
|
.exec(
|
||||||
|
"bash",
|
||||||
|
["codecov.sh", "-n", `${name}`, "-F", `${flags}`, '-y', `${yml}`],
|
||||||
|
options
|
||||||
|
)
|
||||||
|
.then(() => {
|
||||||
|
unlinkFile()
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
const unlinkFile = () => {
|
||||||
|
fs.unlink("codecov.sh", err => {
|
||||||
|
if (err) throw err;
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
});
|
||||||
|
});
|
||||||
|
} catch (error) {
|
||||||
|
core.setFailed(error.message);
|
||||||
|
}
|
||||||
Generated
+829
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,26 @@
|
|||||||
|
{
|
||||||
|
"name": "test2",
|
||||||
|
"version": "1.0.0",
|
||||||
|
"description": "[](https://github.com/marketplace/actions/codecov) ### Easily upload coverage reports to Codecov from GitHub Actions",
|
||||||
|
"main": "index.js",
|
||||||
|
"scripts": {
|
||||||
|
"test": "echo \"Error: no test specified\" && exit 1"
|
||||||
|
},
|
||||||
|
"repository": {
|
||||||
|
"type": "git",
|
||||||
|
"url": "git+https://github.com/codecov/codecov-action.git"
|
||||||
|
},
|
||||||
|
"keywords": [],
|
||||||
|
"author": "",
|
||||||
|
"license": "ISC",
|
||||||
|
"bugs": {
|
||||||
|
"url": "https://github.com/codecov/codecov-action/issues"
|
||||||
|
},
|
||||||
|
"homepage": "https://github.com/codecov/codecov-action#readme",
|
||||||
|
"dependencies": {
|
||||||
|
"@actions/core": "^1.2.0",
|
||||||
|
"@actions/exec": "^1.0.1",
|
||||||
|
"fs": "0.0.1-security",
|
||||||
|
"request": "^2.88.0"
|
||||||
|
}
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user