.gitlab-ci.yml 1.47 KB
Newer Older
Victor's avatar
Victor committed
1 2 3 4 5 6
.test_template: &test_definition
  # Uncomment below if you would like to run the tests on specific references
  # only, such as the branches `master`, `development`, etc.
  # only:
  #   - master
  #   - development
Victor's avatar
Victor committed
7
  script:
Victor's avatar
Victor committed
8 9 10 11 12 13 14 15 16 17 18
    # Let's run the tests. Substitute `coverage = false` below, if you do not
    # want coverage results.
    - julia -e 'using Pkg; Pkg.add(PackageSpec(path =pwd())); Pkg.build("ABMEv"); Pkg.test("ABMEv"; coverage = true)'
    # Comment out below if you do not want coverage results.
    - julia -e 'using Pkg; Pkg.add("Coverage");
      import ABMEv; cd(joinpath(dirname(pathof(ABMEv)), ".."));
      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
19 20
test:1.4:
  image: julia:1.4
Victor's avatar
Victor committed
21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38
  <<: *test_definition


## Below commented because gitlab.ethz.ch has disabled Pages feature
# pages:
#   image: julia:1.4
#   stage: deploy
#   script:
#     - apt-get update -qq && apt-get install -y git  # needed by Documenter
#     - julia -e 'using Pkg; Pkg.add(PackageSpec(path =pwd())); Pkg.build("ABMEv");'  # rebuild Julia (can be put somewhere else I'm sure
#     - julia -e 'using Pkg; import ABMEv; Pkg.add("Documenter")'  # install Documenter
#     - julia --color=yes docs/make.jl  # make documentation
#     - mv docs/build public  # move to the directory picked up by Gitlab pages
#   artifacts:
#     paths:
#       - public
#   only:
#     - master