mirror of
https://github.com/codecov/codecov-action.git
synced 2025-12-08 16:16:24 +00:00
Compare commits
11 Commits
v4.0.0-bet
...
v4-beta
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
428cda1b1c | ||
|
|
572779f95b | ||
|
|
d6353e1297 | ||
|
|
d6b8a01e05 | ||
|
|
59959656dc | ||
|
|
3f71d3b255 | ||
|
|
266a44bf8b | ||
|
|
2409ca5030 | ||
|
|
b65fbdcf97 | ||
|
|
c4cf8a4f03 | ||
|
|
845c445181 |
6
.github/workflows/codeql-analysis.yml
vendored
6
.github/workflows/codeql-analysis.yml
vendored
@@ -41,7 +41,7 @@ jobs:
|
|||||||
|
|
||||||
# Initializes the CodeQL tools for scanning.
|
# Initializes the CodeQL tools for scanning.
|
||||||
- name: Initialize CodeQL
|
- name: Initialize CodeQL
|
||||||
uses: github/codeql-action/init@v2.21.5
|
uses: github/codeql-action/init@v2.21.7
|
||||||
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.21.5
|
uses: github/codeql-action/autobuild@v2.21.7
|
||||||
|
|
||||||
# ℹ️ 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.21.5
|
uses: github/codeql-action/analyze@v2.21.7
|
||||||
|
|||||||
2
.github/workflows/scorecards-analysis.yml
vendored
2
.github/workflows/scorecards-analysis.yml
vendored
@@ -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@v2.21.5 # v1.0.26
|
uses: github/codeql-action/upload-sarif@v2.21.7 # v1.0.26
|
||||||
with:
|
with:
|
||||||
sarif_file: results.sarif
|
sarif_file: results.sarif
|
||||||
|
|||||||
@@ -1,3 +1,7 @@
|
|||||||
|
## 4.0.0-beta.2
|
||||||
|
### Fixes
|
||||||
|
- #1085 not adding -n if empty to do-upload command
|
||||||
|
|
||||||
## 4.0.0-beta.1
|
## 4.0.0-beta.1
|
||||||
|
|
||||||
`v4` represents a move from the [universal uploader](https://github.com/codecov/uploader) to the [Codecov CLI](https://github.com/codecov/codecov-cli). Although this will unlock new features for our users, the CLI is not yet at feature parity with the universal uploader.
|
`v4` represents a move from the [universal uploader](https://github.com/codecov/uploader) to the [Codecov CLI](https://github.com/codecov/codecov-cli). Although this will unlock new features for our users, the CLI is not yet at feature parity with the universal uploader.
|
||||||
|
|||||||
@@ -47,6 +47,9 @@ inputs:
|
|||||||
override_pr:
|
override_pr:
|
||||||
description: 'Specify the pull request number'
|
description: 'Specify the pull request number'
|
||||||
required: false
|
required: false
|
||||||
|
plugins:
|
||||||
|
description: 'Comma-separated list of plugins for use during upload.'
|
||||||
|
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
|
||||||
|
|||||||
18
dist/index.js
vendored
18
dist/index.js
vendored
File diff suppressed because one or more lines are too long
2
dist/index.js.map
vendored
2
dist/index.js.map
vendored
File diff suppressed because one or more lines are too long
1248
package-lock.json
generated
1248
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
12
package.json
12
package.json
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "codecov-action",
|
"name": "codecov-action",
|
||||||
"version": "4.0.0-beta.1",
|
"version": "4.0.0-beta.3",
|
||||||
"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": {
|
||||||
@@ -30,14 +30,14 @@
|
|||||||
"openpgp": "5.10"
|
"openpgp": "5.10"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@types/jest": "^29.5.4",
|
"@types/jest": "^29.5.5",
|
||||||
"@types/node": "^20.6.0",
|
"@types/node": "^20.6.3",
|
||||||
"@typescript-eslint/eslint-plugin": "^6.7.0",
|
"@typescript-eslint/eslint-plugin": "^6.7.2",
|
||||||
"@typescript-eslint/parser": "^6.7.0",
|
"@typescript-eslint/parser": "^6.7.2",
|
||||||
"@vercel/ncc": "^0.38.0",
|
"@vercel/ncc": "^0.38.0",
|
||||||
"eslint": "^8.49.0",
|
"eslint": "^8.49.0",
|
||||||
"eslint-config-google": "^0.14.0",
|
"eslint-config-google": "^0.14.0",
|
||||||
"jest": "^29.6.4",
|
"jest": "^29.7.0",
|
||||||
"jest-junit": "^16.0.0",
|
"jest-junit": "^16.0.0",
|
||||||
"ts-jest": "^29.1.1",
|
"ts-jest": "^29.1.1",
|
||||||
"typescript": "^5.2.0"
|
"typescript": "^5.2.0"
|
||||||
|
|||||||
@@ -35,10 +35,7 @@ test('general args', () => {
|
|||||||
|
|
||||||
|
|
||||||
test('upload args using context', () => {
|
test('upload args using context', () => {
|
||||||
const expectedArgs = [
|
const expectedArgs = [];
|
||||||
'-n',
|
|
||||||
'',
|
|
||||||
];
|
|
||||||
const {uploadExecArgs, uploadCommand} = buildUploadExec();
|
const {uploadExecArgs, uploadCommand} = buildUploadExec();
|
||||||
if (context.eventName == 'pull_request') {
|
if (context.eventName == 'pull_request') {
|
||||||
expectedArgs.push('-C', `${context.payload.pull_request.head.sha}`);
|
expectedArgs.push('-C', `${context.payload.pull_request.head.sha}`);
|
||||||
@@ -65,6 +62,7 @@ test('upload args', () => {
|
|||||||
'override_build': '1',
|
'override_build': '1',
|
||||||
'override_commit': '9caabca5474b49de74ef5667deabaf74cdacc244',
|
'override_commit': '9caabca5474b49de74ef5667deabaf74cdacc244',
|
||||||
'override_pr': '2',
|
'override_pr': '2',
|
||||||
|
'plugins': 'pycoverage,compress-pycoverage',
|
||||||
'root_dir': 'root/',
|
'root_dir': 'root/',
|
||||||
'slug': 'fakeOwner/fakeRepo',
|
'slug': 'fakeOwner/fakeRepo',
|
||||||
'token': 'd3859757-ab80-4664-924d-aef22fa7557b',
|
'token': 'd3859757-ab80-4664-924d-aef22fa7557b',
|
||||||
@@ -102,6 +100,10 @@ test('upload args', () => {
|
|||||||
'9caabca5474b49de74ef5667deabaf74cdacc244',
|
'9caabca5474b49de74ef5667deabaf74cdacc244',
|
||||||
'-P',
|
'-P',
|
||||||
'2',
|
'2',
|
||||||
|
'--plugin',
|
||||||
|
'pycoverage',
|
||||||
|
'--plugin',
|
||||||
|
'compress-pycoverage',
|
||||||
'--network-root-folder',
|
'--network-root-folder',
|
||||||
'root/',
|
'root/',
|
||||||
'-s',
|
'-s',
|
||||||
|
|||||||
@@ -139,6 +139,7 @@ const buildUploadExec = () => {
|
|||||||
const overrideBuild = core.getInput('override_build');
|
const overrideBuild = core.getInput('override_build');
|
||||||
const overrideCommit = core.getInput('override_commit');
|
const overrideCommit = core.getInput('override_commit');
|
||||||
const overridePr = core.getInput('override_pr');
|
const overridePr = core.getInput('override_pr');
|
||||||
|
const plugins = core.getInput('plugins');
|
||||||
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');
|
||||||
@@ -149,10 +150,6 @@ const buildUploadExec = () => {
|
|||||||
const exclude = core.getInput('exclude');
|
const exclude = core.getInput('exclude');
|
||||||
|
|
||||||
const uploadExecArgs = [];
|
const uploadExecArgs = [];
|
||||||
uploadExecArgs.push(
|
|
||||||
'-n',
|
|
||||||
`${name}`,
|
|
||||||
);
|
|
||||||
const uploadCommand = 'do-upload';
|
const uploadCommand = 'do-upload';
|
||||||
const uploadOptions:any = {};
|
const uploadOptions:any = {};
|
||||||
uploadOptions.env = Object.assign(process.env, {
|
uploadOptions.env = Object.assign(process.env, {
|
||||||
@@ -172,7 +169,12 @@ const buildUploadExec = () => {
|
|||||||
envVarsArg.push(envVarClean);
|
envVarsArg.push(envVarClean);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if (name) {
|
||||||
|
uploadExecArgs.push(
|
||||||
|
'-n',
|
||||||
|
`${name}`,
|
||||||
|
);
|
||||||
|
}
|
||||||
if (token) {
|
if (token) {
|
||||||
uploadOptions.env.CODECOV_TOKEN = token;
|
uploadOptions.env.CODECOV_TOKEN = token;
|
||||||
}
|
}
|
||||||
@@ -219,6 +221,11 @@ const buildUploadExec = () => {
|
|||||||
) {
|
) {
|
||||||
uploadExecArgs.push('-P', `${context.payload.number}`);
|
uploadExecArgs.push('-P', `${context.payload.number}`);
|
||||||
}
|
}
|
||||||
|
if (plugins) {
|
||||||
|
plugins.split(',').map((p) => p.trim()).forEach((p) => {
|
||||||
|
uploadExecArgs.push('--plugin', `${p}`);
|
||||||
|
});
|
||||||
|
}
|
||||||
if (rootDir) {
|
if (rootDir) {
|
||||||
uploadExecArgs.push('--network-root-folder', `${rootDir}`);
|
uploadExecArgs.push('--network-root-folder', `${rootDir}`);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user