diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 5da277e..901fb1d 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -13,6 +13,10 @@ # [1]: http://julialang.org/ # [2]: https://docs.julialang.org/en/v1/manual/documentation/index.html +stages: + - test + - post + # Below is the template to run your tests in Julia .test_template: &test_definition # Uncomment below (and adjust as needed) to run the tests for specific references @@ -35,6 +39,20 @@ - ./*/*/*.cov - ./*/*/*/*.cov +.coverage: + stage: post + script: | + # Coverage(Tools).jl scans all .jl files but easily fails at that, + # so make sure we exclude hidden directories (like the depot, .git, ...) + julia -e ' + using Pkg + Pkg.add("Coverage") + using Coverage + dirs = filter(entry -> isdir(entry) && !startswith(entry, "."), readdir()) + coverage = vcat(map(process_folder, dirs)...) + Codecov.submit_local(coverage)' + interruptible: true + # Name a test and select an appropriate image. # images comes from Docker hub test:1.7: