Marc Kupietz | 972d1d2 | 2022-07-22 09:46:38 +0200 | [diff] [blame^] | 1 | .test_template: &test_definition |
| 2 | # Uncomment below (and adjust as needed) to run the tests for specific references |
| 3 | # only, such as the default branch, a `development` branch, and so on: |
| 4 | # rules: |
| 5 | # - if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH |
| 6 | # - if: $CI_COMMIT_BRANCH == "development" |
| 7 | script: |
| 8 | # Let's run the tests. Substitute `coverage = false` below, if you do not |
| 9 | # want coverage results. |
| 10 | - julia -e 'using Pkg; Pkg.clone(pwd()); Pkg.build("DerekoVecs"); Pkg.test("DerekoVecs"; coverage = true)' |
| 11 | # Comment out below if you do not want coverage results. |
| 12 | - julia -e 'using Pkg; Pkg.add("Coverage"); |
| 13 | import DerekoVecs; cd(joinpath(dirname(pathof(DerekoVecs)), "..")); |
| 14 | using Coverage; cl, tl = get_summary(process_folder()); |
| 15 | println("(", cl/tl*100, "%) covered")' |
| 16 | |
| 17 | test: |
| 18 | image: julia:latest |
| 19 | <<: *test_definition |
| 20 | |