-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.gitlab-ci.yml
38 lines (35 loc) · 1.33 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
37
38
# @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.8
before_script:
- apt update && apt install -y git
# Add repo dependencies
- sed -i "s|https://git-ce.|https://gitlab-ci-token:$CI_JOB_TOKEN@git-ce.|g" Manifest.toml
- julia --project=@. -e 'import Pkg; Pkg.instantiate(); 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("BayesNet"; 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