mirror of
https://github.com/codecov/codecov-action.git
synced 2026-04-20 20:32:35 +08:00
Compare commits
10 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
81cd2dc814 | ||
|
|
a03184e530 | ||
|
|
6a6a9ae7b1 | ||
|
|
92a872a5e7 | ||
|
|
43a9c182dd | ||
|
|
13ce822ccd | ||
|
|
4d6dbaaea6 | ||
|
|
98f0f19300 | ||
|
|
d3021d9910 | ||
|
|
2c83f35c20 |
@@ -1,3 +1,12 @@
|
|||||||
|
## 3.1.0
|
||||||
|
### Features
|
||||||
|
- #699 Incorporate `xcode` arguments for the Codecov uploader
|
||||||
|
|
||||||
|
### Dependencies
|
||||||
|
- #694 build(deps-dev): bump @vercel/ncc from 0.33.3 to 0.33.4
|
||||||
|
- #696 build(deps-dev): bump @types/node from 17.0.23 to 17.0.25
|
||||||
|
- #698 build(deps-dev): bump jest-junit from 13.0.0 to 13.2.0
|
||||||
|
|
||||||
## 3.0.0
|
## 3.0.0
|
||||||
### Breaking Changes
|
### Breaking Changes
|
||||||
- #689 Bump to node16 and small fixes
|
- #689 Bump to node16 and small fixes
|
||||||
|
|||||||
6
Makefile
6
Makefile
@@ -1,7 +1,7 @@
|
|||||||
deploy:
|
deploy:
|
||||||
$(eval VERSION := $(shell cat package.json | grep '"version": ' | cut -d\" -f4))
|
$(eval VERSION := $(shell cat package.json | grep '"version": ' | cut -d\" -f4))
|
||||||
git tag -d v2
|
git tag -d v3
|
||||||
git push origin :v2
|
git push origin :v3
|
||||||
git tag v2
|
git tag v3
|
||||||
git tag v$(VERSION) -s -m ""
|
git tag v$(VERSION) -s -m ""
|
||||||
git push origin --tags
|
git push origin --tags
|
||||||
|
|||||||
11
README.md
11
README.md
@@ -61,10 +61,10 @@ 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
|
| `fail_ci_if_error` | Specify if CI pipeline should fail when Codecov runs into errors during upload. *Defaults to **false*** | Optional
|
||||||
| `functionalities` | Toggle functionalities | Optional
|
| `functionalities` | Toggle functionalities | Optional
|
||||||
| | `network` Disable uploading the file network |
|
| | `network` Disable uploading the file network |
|
||||||
| `gcov` | Run with gcov support |
|
| `gcov` | Run with gcov support | Optional
|
||||||
| `gcov_args` | Extra arguments to pass to gcov |
|
| `gcov_args` | Extra arguments to pass to gcov | Optional
|
||||||
| `gcov_ignore` | Paths to ignore during gcov gathering |
|
| `gcov_ignore` | Paths to ignore during gcov gathering | Optional
|
||||||
| `gcov_include` | Paths to include during gcov gathering |
|
| `gcov_include` | Paths to include during gcov gathering | Optional
|
||||||
| `move_coverage_to_trash` | Move discovered coverage reports to the trash | Optional
|
| `move_coverage_to_trash` | Move discovered coverage reports to the trash | Optional
|
||||||
| `name` | Custom defined name for the upload | Optional
|
| `name` | Custom defined name for the upload | Optional
|
||||||
| `override_branch` | Specify the branch name | Optional
|
| `override_branch` | Specify the branch name | Optional
|
||||||
@@ -79,6 +79,9 @@ Codecov's Action currently supports five inputs from the user: `token`, `file`,
|
|||||||
| `verbose` | Specify whether the Codecov output should be verbose | Optional
|
| `verbose` | Specify whether the Codecov output should be verbose | Optional
|
||||||
| `version` | Specify which version of the Codecov Uploader should be used. Defaults to `latest` | Optional
|
| `version` | Specify which version of the Codecov Uploader should be used. Defaults to `latest` | Optional
|
||||||
| `working-directory` | Directory in which to execute `codecov.sh` | Optional
|
| `working-directory` | Directory in which to execute `codecov.sh` | Optional
|
||||||
|
| `xcode` | Run with xcode support | Optional
|
||||||
|
| `xcode_archive_path` | Specify the xcode archive path. Likely specified as the -resultBundlePath and should end in .xcresult | Optional
|
||||||
|
|
||||||
|
|
||||||
### Example `workflow.yml` with Codecov Action
|
### Example `workflow.yml` with Codecov Action
|
||||||
|
|
||||||
|
|||||||
@@ -86,6 +86,12 @@ inputs:
|
|||||||
working-directory:
|
working-directory:
|
||||||
description: 'Directory in which to execute codecov.sh'
|
description: 'Directory in which to execute codecov.sh'
|
||||||
required: false
|
required: false
|
||||||
|
xcode:
|
||||||
|
description: 'Run with xcode support'
|
||||||
|
required: false
|
||||||
|
xcode_archive_path:
|
||||||
|
description: 'Specify the xcode archive path. Likely specified as the -resultBundlePath and should end in .xcresult'
|
||||||
|
required: false
|
||||||
branding:
|
branding:
|
||||||
color: 'red'
|
color: 'red'
|
||||||
icon: 'umbrella'
|
icon: 'umbrella'
|
||||||
|
|||||||
8
dist/index.js
vendored
8
dist/index.js
vendored
@@ -19346,7 +19346,7 @@ var core = __nccwpck_require__(2186);
|
|||||||
// EXTERNAL MODULE: ./node_modules/@actions/github/lib/github.js
|
// EXTERNAL MODULE: ./node_modules/@actions/github/lib/github.js
|
||||||
var github = __nccwpck_require__(5438);
|
var github = __nccwpck_require__(5438);
|
||||||
;// CONCATENATED MODULE: ./package.json
|
;// CONCATENATED MODULE: ./package.json
|
||||||
const package_namespaceObject = {"i8":"3.0.0"};
|
const package_namespaceObject = {"i8":"3.1.0"};
|
||||||
;// CONCATENATED MODULE: ./src/buildExec.ts
|
;// CONCATENATED MODULE: ./src/buildExec.ts
|
||||||
|
|
||||||
|
|
||||||
@@ -19389,6 +19389,8 @@ const buildExec = () => {
|
|||||||
const url = core.getInput('url');
|
const url = core.getInput('url');
|
||||||
const verbose = isTrue(core.getInput('verbose'));
|
const verbose = isTrue(core.getInput('verbose'));
|
||||||
const workingDir = core.getInput('working-directory');
|
const workingDir = core.getInput('working-directory');
|
||||||
|
const xcode = core.getInput('xcode');
|
||||||
|
const xcodeArchivePath = core.getInput('xcode_archive_path');
|
||||||
const execArgs = [];
|
const execArgs = [];
|
||||||
execArgs.push('-n', `${name}`, '-Q', `github-action-${package_namespaceObject.i8}`);
|
execArgs.push('-n', `${name}`, '-Q', `github-action-${package_namespaceObject.i8}`);
|
||||||
const options = {};
|
const options = {};
|
||||||
@@ -19496,6 +19498,10 @@ const buildExec = () => {
|
|||||||
if (workingDir) {
|
if (workingDir) {
|
||||||
options.cwd = workingDir;
|
options.cwd = workingDir;
|
||||||
}
|
}
|
||||||
|
if (xcode && xcodeArchivePath) {
|
||||||
|
execArgs.push('--xc');
|
||||||
|
execArgs.push('--xp', `${xcodeArchivePath}`);
|
||||||
|
}
|
||||||
if (uploaderVersion == '') {
|
if (uploaderVersion == '') {
|
||||||
uploaderVersion = 'latest';
|
uploaderVersion = 'latest';
|
||||||
}
|
}
|
||||||
|
|||||||
2
dist/index.js.map
vendored
2
dist/index.js.map
vendored
File diff suppressed because one or more lines are too long
2
dist/sourcemap-register.js
vendored
2
dist/sourcemap-register.js
vendored
File diff suppressed because one or more lines are too long
46
package-lock.json
generated
46
package-lock.json
generated
@@ -1,12 +1,12 @@
|
|||||||
{
|
{
|
||||||
"name": "codecov-action",
|
"name": "codecov-action",
|
||||||
"version": "3.0.0",
|
"version": "3.1.0",
|
||||||
"lockfileVersion": 2,
|
"lockfileVersion": 2,
|
||||||
"requires": true,
|
"requires": true,
|
||||||
"packages": {
|
"packages": {
|
||||||
"": {
|
"": {
|
||||||
"name": "codecov-action",
|
"name": "codecov-action",
|
||||||
"version": "3.0.0",
|
"version": "3.1.0",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@actions/core": "^1.6.0",
|
"@actions/core": "^1.6.0",
|
||||||
@@ -17,14 +17,14 @@
|
|||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@types/jest": "^27.4.1",
|
"@types/jest": "^27.4.1",
|
||||||
"@types/node": "^17.0.23",
|
"@types/node": "^17.0.25",
|
||||||
"@typescript-eslint/eslint-plugin": "^4.29.2",
|
"@typescript-eslint/eslint-plugin": "^4.29.2",
|
||||||
"@typescript-eslint/parser": "^4.29.2",
|
"@typescript-eslint/parser": "^4.29.2",
|
||||||
"@vercel/ncc": "^0.33.3",
|
"@vercel/ncc": "^0.33.4",
|
||||||
"eslint": "^7.32.0",
|
"eslint": "^7.32.0",
|
||||||
"eslint-config-google": "^0.14.0",
|
"eslint-config-google": "^0.14.0",
|
||||||
"jest": "^26.6.3",
|
"jest": "^26.6.3",
|
||||||
"jest-junit": "^13.0.0",
|
"jest-junit": "^13.2.0",
|
||||||
"ts-jest": "^26.5.6",
|
"ts-jest": "^26.5.6",
|
||||||
"typescript": "^4.6.3"
|
"typescript": "^4.6.3"
|
||||||
}
|
}
|
||||||
@@ -1320,9 +1320,9 @@
|
|||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
"node_modules/@types/node": {
|
"node_modules/@types/node": {
|
||||||
"version": "17.0.23",
|
"version": "17.0.25",
|
||||||
"resolved": "https://registry.npmjs.org/@types/node/-/node-17.0.23.tgz",
|
"resolved": "https://registry.npmjs.org/@types/node/-/node-17.0.25.tgz",
|
||||||
"integrity": "sha512-UxDxWn7dl97rKVeVS61vErvw086aCYhDLyvRQZ5Rk65rZKepaFdm53GeqXaKBuOhED4e9uWq34IC3TdSdJJ2Gw==",
|
"integrity": "sha512-wANk6fBrUwdpY4isjWrKTufkrXdu1D2YHCot2fD/DfWxF5sMrVSA+KN7ydckvaTCh0HiqX9IVl0L5/ZoXg5M7w==",
|
||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
"node_modules/@types/normalize-package-data": {
|
"node_modules/@types/normalize-package-data": {
|
||||||
@@ -1516,9 +1516,9 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@vercel/ncc": {
|
"node_modules/@vercel/ncc": {
|
||||||
"version": "0.33.3",
|
"version": "0.33.4",
|
||||||
"resolved": "https://registry.npmjs.org/@vercel/ncc/-/ncc-0.33.3.tgz",
|
"resolved": "https://registry.npmjs.org/@vercel/ncc/-/ncc-0.33.4.tgz",
|
||||||
"integrity": "sha512-JGZ11QV+/ZcfudW2Cz2JVp54/pJNXbsuWRgSh2ZmmZdQBKXqBtIGrwI1Wyx8nlbzAiEFe7FHi4K1zX4//jxTnQ==",
|
"integrity": "sha512-ln18hs7dMffelP47tpkaR+V5Tj6coykNyxJrlcmCormPqRQjB/Gv4cu2FfBG+PMzIfdZp2CLDsrrB1NPU22Qhg==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"bin": {
|
"bin": {
|
||||||
"ncc": "dist/ncc/cli.js"
|
"ncc": "dist/ncc/cli.js"
|
||||||
@@ -4438,9 +4438,9 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/jest-junit": {
|
"node_modules/jest-junit": {
|
||||||
"version": "13.0.0",
|
"version": "13.2.0",
|
||||||
"resolved": "https://registry.npmjs.org/jest-junit/-/jest-junit-13.0.0.tgz",
|
"resolved": "https://registry.npmjs.org/jest-junit/-/jest-junit-13.2.0.tgz",
|
||||||
"integrity": "sha512-JSHR+Dhb32FGJaiKkqsB7AR3OqWKtldLd6ZH2+FJ8D4tsweb8Id8zEVReU4+OlrRO1ZluqJLQEETm+Q6/KilBg==",
|
"integrity": "sha512-B0XNlotl1rdsvFZkFfoa19mc634+rrd8E4Sskb92Bb8MmSXeWV9XJGUyctunZS1W410uAxcyYuPUGVnbcOH8cg==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"mkdirp": "^1.0.4",
|
"mkdirp": "^1.0.4",
|
||||||
@@ -8826,9 +8826,9 @@
|
|||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
"@types/node": {
|
"@types/node": {
|
||||||
"version": "17.0.23",
|
"version": "17.0.25",
|
||||||
"resolved": "https://registry.npmjs.org/@types/node/-/node-17.0.23.tgz",
|
"resolved": "https://registry.npmjs.org/@types/node/-/node-17.0.25.tgz",
|
||||||
"integrity": "sha512-UxDxWn7dl97rKVeVS61vErvw086aCYhDLyvRQZ5Rk65rZKepaFdm53GeqXaKBuOhED4e9uWq34IC3TdSdJJ2Gw==",
|
"integrity": "sha512-wANk6fBrUwdpY4isjWrKTufkrXdu1D2YHCot2fD/DfWxF5sMrVSA+KN7ydckvaTCh0HiqX9IVl0L5/ZoXg5M7w==",
|
||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
"@types/normalize-package-data": {
|
"@types/normalize-package-data": {
|
||||||
@@ -8948,9 +8948,9 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"@vercel/ncc": {
|
"@vercel/ncc": {
|
||||||
"version": "0.33.3",
|
"version": "0.33.4",
|
||||||
"resolved": "https://registry.npmjs.org/@vercel/ncc/-/ncc-0.33.3.tgz",
|
"resolved": "https://registry.npmjs.org/@vercel/ncc/-/ncc-0.33.4.tgz",
|
||||||
"integrity": "sha512-JGZ11QV+/ZcfudW2Cz2JVp54/pJNXbsuWRgSh2ZmmZdQBKXqBtIGrwI1Wyx8nlbzAiEFe7FHi4K1zX4//jxTnQ==",
|
"integrity": "sha512-ln18hs7dMffelP47tpkaR+V5Tj6coykNyxJrlcmCormPqRQjB/Gv4cu2FfBG+PMzIfdZp2CLDsrrB1NPU22Qhg==",
|
||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
"abab": {
|
"abab": {
|
||||||
@@ -11190,9 +11190,9 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"jest-junit": {
|
"jest-junit": {
|
||||||
"version": "13.0.0",
|
"version": "13.2.0",
|
||||||
"resolved": "https://registry.npmjs.org/jest-junit/-/jest-junit-13.0.0.tgz",
|
"resolved": "https://registry.npmjs.org/jest-junit/-/jest-junit-13.2.0.tgz",
|
||||||
"integrity": "sha512-JSHR+Dhb32FGJaiKkqsB7AR3OqWKtldLd6ZH2+FJ8D4tsweb8Id8zEVReU4+OlrRO1ZluqJLQEETm+Q6/KilBg==",
|
"integrity": "sha512-B0XNlotl1rdsvFZkFfoa19mc634+rrd8E4Sskb92Bb8MmSXeWV9XJGUyctunZS1W410uAxcyYuPUGVnbcOH8cg==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"requires": {
|
"requires": {
|
||||||
"mkdirp": "^1.0.4",
|
"mkdirp": "^1.0.4",
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "codecov-action",
|
"name": "codecov-action",
|
||||||
"version": "3.0.0",
|
"version": "3.1.0",
|
||||||
"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": {
|
||||||
@@ -31,14 +31,14 @@
|
|||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@types/jest": "^27.4.1",
|
"@types/jest": "^27.4.1",
|
||||||
"@types/node": "^17.0.23",
|
"@types/node": "^17.0.25",
|
||||||
"@typescript-eslint/eslint-plugin": "^4.29.2",
|
"@typescript-eslint/eslint-plugin": "^4.29.2",
|
||||||
"@typescript-eslint/parser": "^4.29.2",
|
"@typescript-eslint/parser": "^4.29.2",
|
||||||
"@vercel/ncc": "^0.33.3",
|
"@vercel/ncc": "^0.33.4",
|
||||||
"eslint": "^7.32.0",
|
"eslint": "^7.32.0",
|
||||||
"eslint-config-google": "^0.14.0",
|
"eslint-config-google": "^0.14.0",
|
||||||
"jest": "^26.6.3",
|
"jest": "^26.6.3",
|
||||||
"jest-junit": "^13.0.0",
|
"jest-junit": "^13.2.0",
|
||||||
"ts-jest": "^26.5.6",
|
"ts-jest": "^26.5.6",
|
||||||
"typescript": "^4.6.3"
|
"typescript": "^4.6.3"
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -53,6 +53,8 @@ test('all arguments', () => {
|
|||||||
'url': 'https://codecov.enterprise.com',
|
'url': 'https://codecov.enterprise.com',
|
||||||
'verbose': 't',
|
'verbose': 't',
|
||||||
'working-directory': 'src',
|
'working-directory': 'src',
|
||||||
|
'xcode': 'true',
|
||||||
|
'xcode_archive_path': '/test.xcresult',
|
||||||
};
|
};
|
||||||
|
|
||||||
for (const env of Object.keys(envs)) {
|
for (const env of Object.keys(envs)) {
|
||||||
@@ -110,6 +112,9 @@ test('all arguments', () => {
|
|||||||
'-u',
|
'-u',
|
||||||
'https://codecov.enterprise.com',
|
'https://codecov.enterprise.com',
|
||||||
'-v',
|
'-v',
|
||||||
|
'--xc',
|
||||||
|
'--xp',
|
||||||
|
'/test.xcresult',
|
||||||
]);
|
]);
|
||||||
expect(failCi).toBeTruthy();
|
expect(failCi).toBeTruthy();
|
||||||
|
|
||||||
|
|||||||
@@ -45,6 +45,8 @@ const buildExec = () => {
|
|||||||
const url = core.getInput('url');
|
const url = core.getInput('url');
|
||||||
const verbose = isTrue(core.getInput('verbose'));
|
const verbose = isTrue(core.getInput('verbose'));
|
||||||
const workingDir = core.getInput('working-directory');
|
const workingDir = core.getInput('working-directory');
|
||||||
|
const xcode = core.getInput('xcode');
|
||||||
|
const xcodeArchivePath = core.getInput('xcode_archive_path');
|
||||||
|
|
||||||
const execArgs = [];
|
const execArgs = [];
|
||||||
execArgs.push(
|
execArgs.push(
|
||||||
@@ -165,6 +167,10 @@ const buildExec = () => {
|
|||||||
if (workingDir) {
|
if (workingDir) {
|
||||||
options.cwd = workingDir;
|
options.cwd = workingDir;
|
||||||
}
|
}
|
||||||
|
if (xcode && xcodeArchivePath) {
|
||||||
|
execArgs.push('--xc');
|
||||||
|
execArgs.push('--xp', `${xcodeArchivePath}`);
|
||||||
|
}
|
||||||
|
|
||||||
if (uploaderVersion == '') {
|
if (uploaderVersion == '') {
|
||||||
uploaderVersion = 'latest';
|
uploaderVersion = 'latest';
|
||||||
|
|||||||
@@ -12,7 +12,11 @@ import {
|
|||||||
setFailure,
|
setFailure,
|
||||||
} from './helpers';
|
} from './helpers';
|
||||||
|
|
||||||
const verify = async (filename: string, platform: string, version: string) => {
|
const verify = async (
|
||||||
|
filename: string,
|
||||||
|
platform: string,
|
||||||
|
version: string,
|
||||||
|
): Promise<void> => {
|
||||||
try {
|
try {
|
||||||
const uploaderName = getUploaderName(platform);
|
const uploaderName = getUploaderName(platform);
|
||||||
|
|
||||||
|
|||||||
@@ -1,7 +1,10 @@
|
|||||||
import * as core from '@actions/core';
|
import * as core from '@actions/core';
|
||||||
import * as fetch from 'node-fetch';
|
import * as fetch from 'node-fetch';
|
||||||
|
|
||||||
const versionInfo = async (platform: string, version?: string) => {
|
const versionInfo = async (
|
||||||
|
platform: string,
|
||||||
|
version?: string,
|
||||||
|
): Promise<void> => {
|
||||||
if (version) {
|
if (version) {
|
||||||
core.info(`==> Running version ${version}`);
|
core.info(`==> Running version ${version}`);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user