Switch to using GitLab CI extends (#140)

This commit is contained in:
Curtis Vogt 2020-02-24 18:40:19 -06:00 committed by GitHub
parent ba14f890e2
commit 71fc3de4d0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 56 additions and 54 deletions

View File

@ -1,30 +1,30 @@
.definitions:
script: &script
script:
- |
julia --project=@. -e '
using Pkg
Pkg.build()
Pkg.test({{#HAS_COVERAGE}}coverage=true{{/HAS_COVERAGE}})'
.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'
.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
extends:
- .script
{{#HAS_COVERAGE}}
<<: *coverage
- .coverage
{{/HAS_COVERAGE}}
{{/VERSIONS}}
{{#HAS_DOCUMENTER}}

View File

@ -1,27 +1,28 @@
.definitions:
script: &script
script:
- |
julia --project=@. -e '
using Pkg
Pkg.build()
Pkg.test(coverage=true)'
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'
.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.0:
image: julia:1.0
<<: *script
<<: *coverage
extends:
- .script
- .coverage
Julia 1.3:
image: julia:1.3
<<: *script
<<: *coverage
extends:
- .script
- .coverage

View File

@ -1,17 +1,18 @@
.definitions:
script: &script
script:
- |
julia --project=@. -e '
using Pkg
Pkg.build()
Pkg.test()'
.script:
script:
- |
julia --project=@. -e '
using Pkg
Pkg.build()
Pkg.test()'
Julia 0.6:
image: julia:0.6
<<: *script
extends:
- .script
Julia 1.2:
image: julia:1.2
<<: *script
extends:
- .script
pages:
image: julia:1.2
stage: deploy