From 4e10de5e9af1cbf5ed9e135efaf7596ec15e7ae3 Mon Sep 17 00:00:00 2001 From: florian <f.spreckelsen@inidscale.com> Date: Wed, 30 Jun 2021 10:14:49 +0200 Subject: [PATCH] WIP: Pipeline for 1.0 and 1.6 simultaneously --- .gitlab-ci.yml | 37 +++++++++++++++++++++++++++---------- 1 file changed, 27 insertions(+), 10 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index d92e323..899bdba 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -20,8 +20,10 @@ stages: - test - deploy -# Below is the template to run your tests in Julia -.test_template: &test_definition +# Name a test and select an appropriate image. +# images comes from Docker hub +test:1.0: + image: julia:1.0 # Use `docker` runners tags: [ docker ] # Uncomment below if you would like to run the tests on specific @@ -32,8 +34,8 @@ stages: # - development script: # Let's run the tests. Substitute `coverage = false` below, if you - # do not want coverage results. - - julia -e 'using Pkg; Pkg.add(path=pwd()); + # do not want coverage results. Use Pkg.clone for Julia 1.0 + - julia -e 'using Pkg; Pkg.clone(pwd()); Pkg.build("CaosDB"); Pkg.test("CaosDB"; coverage = true)' # Comment out below if you do not want coverage results. @@ -43,14 +45,29 @@ stages: using Coverage; cl, tl = get_summary(process_folder()); println("(", cl/tl*100, "%) covered")' -# Name a test and select an appropriate image. -# images comes from Docker hub -test:1.0: - image: julia:1.0 - <<: *test_definition test:1.6: image: julia:1.6 - <<: *test_definition + # Use `docker` runners + tags: [ docker ] + # Uncomment below if you would like to run the tests on specific + # references only, such as the branches `master`, `development`, + # etc. + # only: + # - master + # - development + script: + # Let's run the tests. Substitute `coverage = false` below, if you + # do not want coverage results. + - julia -e 'using Pkg; Pkg.add(path=pwd()); + Pkg.build("CaosDB"); + Pkg.test("CaosDB"; coverage = true)' + # Comment out below if you do not want coverage results. + - julia -e 'using Pkg; Pkg.add("Coverage"); + import CaosDB; + cd(joinpath(dirname(pathof(CaosDB)), "..")); + using Coverage; cl, tl = get_summary(process_folder()); + println("(", cl/tl*100, "%) covered")' + # REMARK: Do not forget to enable the coverage feature for your # project, if you are using code coverage reporting above. This can be -- GitLab