Skip to content
Snippets Groups Projects
Commit 4e10de5e authored by florian's avatar florian
Browse files

WIP: Pipeline for 1.0 and 1.6 simultaneously

parent 58a7858f
Branches
Tags
No related merge requests found
Pipeline #9507 failed
...@@ -20,8 +20,10 @@ stages: ...@@ -20,8 +20,10 @@ stages:
- test - test
- deploy - deploy
# Below is the template to run your tests in Julia # Name a test and select an appropriate image.
.test_template: &test_definition # images comes from Docker hub
test:1.0:
image: julia:1.0
# Use `docker` runners # Use `docker` runners
tags: [ docker ] tags: [ docker ]
# Uncomment below if you would like to run the tests on specific # Uncomment below if you would like to run the tests on specific
...@@ -32,8 +34,8 @@ stages: ...@@ -32,8 +34,8 @@ stages:
# - development # - development
script: script:
# Let's run the tests. Substitute `coverage = false` below, if you # Let's run the tests. Substitute `coverage = false` below, if you
# do not want coverage results. # do not want coverage results. Use Pkg.clone for Julia 1.0
- julia -e 'using Pkg; Pkg.add(path=pwd()); - julia -e 'using Pkg; Pkg.clone(pwd());
Pkg.build("CaosDB"); Pkg.build("CaosDB");
Pkg.test("CaosDB"; coverage = true)' Pkg.test("CaosDB"; coverage = true)'
# Comment out below if you do not want coverage results. # Comment out below if you do not want coverage results.
...@@ -43,14 +45,29 @@ stages: ...@@ -43,14 +45,29 @@ stages:
using Coverage; cl, tl = get_summary(process_folder()); using Coverage; cl, tl = get_summary(process_folder());
println("(", cl/tl*100, "%) covered")' 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: test:1.6:
image: julia: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 # REMARK: Do not forget to enable the coverage feature for your
# project, if you are using code coverage reporting above. This can be # project, if you are using code coverage reporting above. This can be
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment