-
Notifications
You must be signed in to change notification settings - Fork 3
/
.gitlab-ci.yml
44 lines (41 loc) · 934 Bytes
/
.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
39
40
41
42
43
44
.check: # Specifying files to run CI/CD
script: echo "Running CI/CD only if specific files are changed"
rules:
- if: $CI_PIPELINE_SOURCE == "push" && $CI_COMMIT_BRANCH
changes:
- src/**
- test/runtest.jl
- Project.toml
- Manifest.toml
when: manual
# Generated using PkgTemplate and altered to check specific files for changes
.script:
script:
- |
julia --project=@. -e '
using Pkg
Pkg.build()
Pkg.test(coverage=true)'
.coverage:
coverage: /Test coverage (\d+\.\d+%)/
after_script:
- |
julia -e '
using Pkg
Pkg.add("Coverage")
using Coverage
c, t = get_summary(process_folder())
using Printf
@printf "Test coverage %.2f%%\n" 100c / t'
Julia 1.6:
image: julia:1.6
extends:
- .check
- .script
- .coverage
Julia 1.7:
image: julia:1.7
extends:
- .check
- .script
- .coverage