Skip to content

Commit

Permalink
Switch to using GitLab CI extends
Browse files Browse the repository at this point in the history
  • Loading branch information
omus committed Feb 14, 2020
1 parent ab9949a commit 53e8460
Show file tree
Hide file tree
Showing 4 changed files with 49 additions and 50 deletions.
37 changes: 18 additions & 19 deletions templates/gitlab-ci.yml
Original file line number Diff line number Diff line change
@@ -1,28 +1,27 @@
.definitions:
script: &script
script:
- julia --project=@. -e '
using Pkg;
Pkg.build();
Pkg.test({{#HAS_COVERAGE}}; coverage=true{{/HAS_COVERAGE}});'
.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}}
Expand Down
42 changes: 21 additions & 21 deletions test/fixtures/AllPlugins/.gitlab-ci.yml
Original file line number Diff line number Diff line change
@@ -1,25 +1,25 @@
.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:
- 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
18 changes: 9 additions & 9 deletions test/fixtures/WackyOptions/.gitlab-ci.yml
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
.definitions:
script: &script
script:
- julia --project=@. -e '
using Pkg;
Pkg.build();
Pkg.test();'
.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
Expand Down
2 changes: 1 addition & 1 deletion test/fixtures/WackyOptions/docs/Manifest.toml
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ uuid = "69de0a69-1ddd-5017-9359-2bf0b02dc9f0"
version = "0.3.10"

[[Pkg]]
deps = ["Dates", "LibGit2", "Libdl", "Logging", "Markdown", "Printf", "REPL", "Random", "SHA", "UUIDs"]
deps = ["Dates", "LibGit2", "Libdl", "Logging", "Markdown", "Printf", "REPL", "Random", "SHA", "Test", "UUIDs"]
uuid = "44cfe95a-1eb2-52ea-b672-e2afdf69b78f"

[[Printf]]
Expand Down

0 comments on commit 53e8460

Please sign in to comment.