diff --git a/action.yml b/action.yml index abfec2c..80da5f7 100644 --- a/action.yml +++ b/action.yml @@ -1,6 +1,10 @@ name: 'Run Julia package tests' description: 'Run the tests in a Julia package' author: 'David Anthoff' +inputs: + inline: + description: 'Value passed to the --inline flag. Options: yes | no. Default value: yes.' + default: 'yes' runs: using: 'node12' main: 'lib/main.js' diff --git a/lib/main.js b/lib/main.js index da2b031..92d8127 100644 --- a/lib/main.js +++ b/lib/main.js @@ -21,20 +21,9 @@ const exec = __importStar(require("@actions/exec")); function run() { return __awaiter(this, void 0, void 0, function* () { try { - const codecov = core.getInput('codecov'); - const coveralls = core.getInput('coveralls'); - // 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']); + const inline = core.getInput('inline'); // 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())']) - yield exec.exec('julia', ['--color=yes', '-e', 'using Pkg; Pkg.add(PackageSpec(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())']) - yield exec.exec('julia', ['--color=yes', '-e', 'using Pkg; Pkg.add(PackageSpec(url="https://github.com/davidanthoff/Coverage.jl.git", rev="githubactions")); using Coverage; Coveralls.submit(process_folder())']); - } + yield exec.exec('julia', ['--color=yes', '--check-bounds=yes', `--inline=${inline}`, '--project', '-e', 'using Pkg; Pkg.test(coverage=true)']); } catch (error) { core.setFailed(error.message); diff --git a/src/main.ts b/src/main.ts index ddede70..1b5161a 100644 --- a/src/main.ts +++ b/src/main.ts @@ -3,8 +3,9 @@ import * as exec from '@actions/exec' async function run() { try { + const inline: string = core.getInput('inline') // Run Pkg.test - await exec.exec('julia', ['--color=yes', '--check-bounds=yes', '--project', '-e', 'using Pkg; Pkg.test(coverage=true)']) + await exec.exec('julia', ['--color=yes', '--check-bounds=yes', `--inline=${inline}`, '--project', '-e', 'using Pkg; Pkg.test(coverage=true)']) } catch (error) { core.setFailed(error.message) }