-
Notifications
You must be signed in to change notification settings - Fork 0
/
.gitlab-ci.yml
36 lines (33 loc) · 1.21 KB
/
.gitlab-ci.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
# @license BSD-3 https://opensource.org/licenses/BSD-3-Clause
# Copyright (c) 2022, Institute of Automatic Control - RWTH Aachen University
# All rights reserved.
default:
image: julia:1.9-bullseye
before_script:
- apt update && apt install -y git
- julia --project=@. -e "import Pkg; Pkg.build()"
test:
stage: test
script:
- apt update && apt install -y python3-pip lcov
- pip install lcov_cobertura
- julia --project=@. -e 'using Pkg; Pkg.add("LocalCoverage"); using LocalCoverage; cov = generate_coverage("KernelDistributions"; run_test = true); generate_xml(cov, "coverage.xml"); html_coverage(cov; dir="coverage_html"); report_coverage_and_exit(cov; target_coverage=70);'
coverage: '/TOTAL.*│\s*(\d+)\%/'
artifacts:
paths:
- coverage/coverage.xml
- coverage_html
reports:
coverage_report:
coverage_format: cobertura
path: coverage/coverage.xml
pages:
stage: deploy
script:
- julia --project=@. -e 'using Pkg; Pkg.add("Documenter"); Pkg.instantiate(); include("docs/make.jl");'
- mv docs/build public # move to the directory picked up by Gitlab pages
artifacts:
paths:
- public
rules:
- if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH