Add support for codecov

This commit is contained in:
David Anthoff
2019-09-15 10:52:10 -07:00
parent 1825e09d53
commit 9fe8d30582
2 changed files with 10 additions and 11 deletions

View File

@@ -18,21 +18,19 @@ var __importStar = (this && this.__importStar) || function (mod) {
Object.defineProperty(exports, "__esModule", { value: true });
const core = __importStar(require("@actions/core"));
const exec = __importStar(require("@actions/exec"));
const os = __importStar(require("os"));
// Store information about the environment
const osPlat = os.platform(); // possible values: win32 (Windows), linux (Linux), darwin (macOS)
core.debug(`platform: ${osPlat}`);
function run() {
return __awaiter(this, void 0, void 0, function* () {
try {
const codecov = core.getInput('codecov');
const coveralls = core.getInput('coveralls');
// Test if Julia has been installed by showing versioninfo()
// Run Pkg.build
yield exec.exec('julia', ['--color=yes', '--project', '-e', 'using Pkg; if VERSION >= v\"1.1.0-rc1\"; Pkg.build(verbose=true); else Pkg.build(); end']);
// Run Pkg.test
yield exec.exec('julia', ['--color=yes', '--check-bounds=yes', '--project', '-e', 'using Pkg; Pkg.test(coverage=true)']);
// if(codecov=='true') {
// await exec.exec('julia', ['--color=yes', '-e', 'using Pkg; Pkg.add("Coverage"); using Coverage; Codecov.submit(process_folder())'])
// }
if (codecov == 'true') {
// await exec.exec('julia', ['--color=yes', '-e', 'using Pkg; Pkg.add("Coverage"); using Coverage; Codecov.submit(process_folder())'])
yield exec.exec('julia', ['--color=yes', '-e', 'using Pkg; Pkg.add(PkgSpec(url="https://github.com/davidanthoff/Coverage.jl.git", rev="githubactions")); using Coverage; Codecov.submit(process_folder())']);
}
// if(coveralls=='true') {
// await exec.exec('julia', ['--color=yes', '-e', 'using Pkg; Pkg.add("Coverage"); using Coverage; Coveralls.submit(process_folder())'])
// }