
Allows for Julia code to not require the use of semi-colon which is matches how most users will write Julia code. An additional benefit is that it allows for use of single line comments.
49 lines
1.0 KiB
YAML
49 lines
1.0 KiB
YAML
.definitions:
|
|
script: &script
|
|
script:
|
|
- |
|
|
julia --project=@. -e '
|
|
using Pkg
|
|
Pkg.build()
|
|
Pkg.test({{#HAS_COVERAGE}}coverage=true{{/HAS_COVERAGE}})'
|
|
{{#HAS_COVERAGE}}
|
|
coverage: &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'
|
|
{{/HAS_COVERAGE}}
|
|
{{#VERSIONS}}
|
|
Julia {{{.}}}:
|
|
image: julia:{{{.}}}
|
|
<<: *script
|
|
{{#HAS_COVERAGE}}
|
|
<<: *coverage
|
|
{{/HAS_COVERAGE}}
|
|
{{/VERSIONS}}
|
|
{{#HAS_DOCUMENTER}}
|
|
pages:
|
|
image: julia:{{{VERSION}}}
|
|
stage: deploy
|
|
script:
|
|
- |
|
|
julia --project=docs -e '
|
|
using Pkg
|
|
Pkg.develop(PackageSpec(path=pwd()))
|
|
Pkg.instantiate()
|
|
include("docs/make.jl")'
|
|
- mkdir -p public
|
|
- mv docs/build public/dev
|
|
artifacts:
|
|
paths:
|
|
- public
|
|
only:
|
|
- master
|
|
{{/HAS_DOCUMENTER}}
|