diff --git a/README.md b/README.md index 762f9c4..2f0904c 100644 --- a/README.md +++ b/README.md @@ -1,15 +1,11 @@ # julia-runtest Action -This action runs the tests in a Julia package and uploads coverage results to [Coveralls](https://coveralls.io/) and [Codecov](https://codecov.io/). +This action runs the tests in a Julia package. ## Usage Julia needs to be installed before this action can run. This can easily be achieved with the [setup-julia](https://github.com/marketplace/actions/setup-julia-environment) action. -This action accepts two inpus: `codecov` (with values `true` or `false`) and `coveralls` (with values `true` or `false`). These inputs control whether coverage results are automatically uploaded to the respective service. Both inputs have a default value of `true`. - -Uploads to [Coveralls](https://coveralls.io/) or [Codecov](https://codecov.io/) only work if an upload token for the respective service is stored as a Github Actions secret and made available to the action. These tokens need to be stored in the environment variables `CODECOV_TOKEN` and `COVERALLS_TOKEN`. - And example workflow that uses this action might look like this: ``` @@ -35,7 +31,4 @@ jobs: with: version: ${{ matrix.julia-version }} - uses: julia-actions/julia-runtest@master - env: - CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} - COVERALLS_TOKEN: ${{ secrets.COVERALLS_TOKEN }} ``` diff --git a/action.yml b/action.yml index 828ad91..abfec2c 100644 --- a/action.yml +++ b/action.yml @@ -1,15 +1,6 @@ name: 'Run Julia package tests' description: 'Run the tests in a Julia package' author: 'David Anthoff' -inputs: - codecov: - description: 'Coverage results upload to codecov.' - required: false - default: 'true' - coveralls: - description: 'Coverage results upload to coveralls.' - required: false - default: 'true' runs: using: 'node12' main: 'lib/main.js' diff --git a/src/main.ts b/src/main.ts index 87e9d79..ddede70 100644 --- a/src/main.ts +++ b/src/main.ts @@ -3,24 +3,8 @@ import * as exec from '@actions/exec' async function run() { try { - const codecov = core.getInput('codecov') - const coveralls = core.getInput('coveralls') - - // Run Pkg.build - await 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 await 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())']) - await 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())']) - await 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())']) - } } catch (error) { core.setFailed(error.message) }