Skip to content
Snippets Groups Projects
Verified Commit 6a2ad348 authored by Laurent Heirendt's avatar Laurent Heirendt :airplane:
Browse files

change flow of CI

parent b8a20791
No related branches found
No related tags found
No related merge requests found
image: $CI_REGISTRY/r3/docker/julia-custom
stages:
- test-v1.5
- test-v1.6
- format-check
- test-required
- test-containers
- test-additional
- deploy-doc
variables:
......@@ -24,18 +25,38 @@ variables:
script:
- Invoke-Expression $Env:ARTENOLIS_SOFT_PATH"\julia\"$Env:JULIA_VER"\bin\julia --color=yes --project=@. -e 'import Pkg; Pkg.test(; coverage = true)'"
# Check the format of the code
# --------------------------------------
format:
stage: format-check
rules:
- if: $CI_PIPELINE_SOURCE == "external_pull_request_event"
- if: $CI_COMMIT_BRANCH == "master"
script:
- julia --project=@. -e 'using JuliaFormatter; format(".", verbose=true)'
after_script:
- julia --project=@. -e 'out = Cmd(`git diff --name-only`) |> read |> String;
if out == ""
exit(0)
else
@error "Some files have not been formatted!"
write(stdout, out)
exit(1)
end'
# Test Julia v1.5
# --------------------------------------
linux:v1.5:
stage: test-v1.5
stage: test-required
variables:
JULIA_VER: "v1.5.3"
<<: *global_settings
<<: *global_testing_linux
windows10:v1.5:
stage: test-v1.5
stage: test-additional
tags:
- windows10
variables:
......@@ -44,7 +65,7 @@ windows10:v1.5:
<<: *global_testing_win
windows8:v1.5:
stage: test-v1.5
stage: test-additional
tags:
- windows8
variables:
......@@ -56,7 +77,7 @@ windows8:v1.5:
# --------------------------------------
linux:v1.6:
stage: test-v1.6
stage: test-required
needs: ["linux:v1.5"]
variables:
JULIA_VER: "v1.6.0"
......@@ -64,7 +85,7 @@ linux:v1.6:
<<: *global_testing_linux
windows10:v1.6:
stage: test-v1.6
stage: test-additional
needs: ["windows10:v1.5"]
tags:
- windows10
......@@ -74,7 +95,7 @@ windows10:v1.6:
<<: *global_testing_win
windows8:v1.6:
stage: test-v1.6
stage: test-additional
needs: ["windows8:v1.5"]
tags:
- windows8
......@@ -87,7 +108,7 @@ windows8:v1.6:
# --------------------------------------
docker:v1.6:
stage: test-v1.6
stage: test-containers
rules:
- if: $CI_PIPELINE_SOURCE == "external_pull_request_event"
- if: $CI_COMMIT_BRANCH == "master"
......@@ -96,25 +117,6 @@ docker:v1.6:
after_script:
- julia --project=test/coverage test/coverage/coverage-summary.jl
# Check the format of the code
# --------------------------------------
format:
stage: format-check
rules:
- if: $CI_PIPELINE_SOURCE == "external_pull_request_event"
- if: $CI_COMMIT_BRANCH == "master"
script:
- julia --project=@. -e 'using JuliaFormatter; format(".", verbose=true)'
after_script:
- julia --project=@. -e 'out = Cmd(`git diff --name-only`) |> read |> String;
if out == ""
exit(0)
else
@error "Some files have not been formatted!"
write(stdout, out)
exit(1)
end'
# Deploy the documentation
# --------------------------------------
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment