-
-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy path.gitlab-ci.yml
More file actions
97 lines (93 loc) · 2.34 KB
/
.gitlab-ci.yml
File metadata and controls
97 lines (93 loc) · 2.34 KB
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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
variables:
CACHE_PREFIX: "julia-env-cache"
JULIA_DEPOT_PATH: "$CI_PROJECT_DIR/.julia"
QUARTO_VERSION: "1.7.30"
.test_template: &test_definition
script:
- |
julia --project=@. -e '
using Pkg
Pkg.build("Corleone")
Pkg.test("Corleone"; coverage=true)'
- |
julia -e 'using Pkg; Pkg.add("Coverage");
using Coverage;
coverage = process_folder();
coverage = merge_coverage_counts(coverage, filter!(
let prefixes = (joinpath(pwd(), "src", ""),)
c -> any(p -> startswith(c.filename, p), prefixes)
end,
LCOV.readfolder("test")));
covered_lines, total_lines = get_summary(coverage);
println("Coverage $(covered_lines / total_lines)");'
cache:
key:
files:
- Project.toml
- Manifest.toml
prefix: "${CACHE_PREFIX}-test"
paths:
- .julia/artifacts
- .julia/packages
- .julia/compiled
process-examples:
stage: test
image: julia:1.10
script:
- cd docs
- julia --project=@. -e 'include("process_examples.jl")'
cache:
key:
files:
- docs/Project.toml
- docs/Manifest.toml
prefix: "${CACHE_PREFIX}-doc"
paths:
- .julia/artifacts
- .julia/packages
- .julia/compiled
artifacts:
paths:
- docs/examples/code
- test/examples
rules:
- if: $CI_COMMIT_BRANCH == "superduperstuffmain"
test:1.10:
stage: test
image: julia:1.10
needs:
- job: process-examples
artifacts: true
<<: *test_definition
render-docs:
stage: deploy
image: julia:1.10
before_script:
- apt-get update -y
- apt-get install -y curl unzip
- curl -LO https://github.com/quarto-dev/quarto-cli/releases/download/v${QUARTO_VERSION}/quarto-${QUARTO_VERSION}-linux-arm64.deb
- dpkg -i quarto-${QUARTO_VERSION}-linux-arm64.deb
- quarto check
script:
- cd docs
- julia --project=@. -e 'using Pkg; Pkg.develop(path=joinpath(pwd(), ".."))'
- quarto render
cache:
key:
files:
- docs/Project.toml
- docs/Manifest.toml
prefix: "${CACHE_PREFIX}-doc"
paths:
- .julia/artifacts
- .julia/packages
- .julia/compiled
artifacts:
paths:
- public
needs:
- job: process-examples
artifacts: true
pages: true
rules:
- if: $CI_COMMIT_BRANCH == "superduperstuffmain"