summaryrefslogtreecommitdiff
path: root/.gitlab-ci.yml
diff options
context:
space:
mode:
Diffstat (limited to '.gitlab-ci.yml')
-rw-r--r--.gitlab-ci.yml46
1 files changed, 43 insertions, 3 deletions
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 2d33bad5886..8da9acf9066 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -28,6 +28,7 @@ stages:
- prepare
- test
- post-test
+- pages
# Prepare and merge knapsack tests
.knapsack-state: &knapsack-state
@@ -40,6 +41,7 @@ stages:
paths:
- knapsack/
artifacts:
+ expire_in: 31d
paths:
- knapsack/
@@ -81,8 +83,10 @@ update-knapsack:
- cp knapsack/rspec_report.json ${KNAPSACK_REPORT_PATH}
- knapsack rspec
artifacts:
+ expire_in: 31d
paths:
- knapsack/
+ - coverage/
.spinach-knapsack: &spinach-knapsack
stage: test
@@ -97,8 +101,10 @@ update-knapsack:
- cp knapsack/spinach_report.json ${KNAPSACK_REPORT_PATH}
- knapsack spinach "-r rerun" || retry '[ ! -e tmp/spinach-rerun.txt ] || bundle exec spinach -r rerun $(cat tmp/spinach-rerun.txt)'
artifacts:
+ expire_in: 31d
paths:
- knapsack/
+ - coverage/
rspec 0 20: *rspec-knapsack
rspec 1 20: *rspec-knapsack
@@ -186,14 +192,14 @@ spinach 9 10 ruby23: *spinach-knapsack-ruby23
# Other generic tests
-.static-analyses-variables: &static-analyses-variables
+.ruby-static-analysis: &ruby-static-analysis
variables:
SIMPLECOV: "false"
USE_DB: "false"
USE_BUNDLE_INSTALL: "true"
.exec: &exec
- <<: *static-analyses-variables
+ <<: *ruby-static-analysis
stage: test
script:
- bundle exec $CI_BUILD_NAME
@@ -220,16 +226,35 @@ teaspoon:
bundler:audit:
stage: test
- <<: *static-analyses-variables
+ <<: *ruby-static-analysis
only:
- master
script:
- "bundle exec bundle-audit check --update --ignore OSVDB-115941"
+coverage:
+ stage: post-test
+ services: []
+ variables:
+ USE_DB: "false"
+ USE_BUNDLE_INSTALL: "true"
+ script:
+ - bundle exec scripts/merge-simplecov
+ artifacts:
+ name: coverage
+ expire_in: 31d
+ paths:
+ - coverage/index.html
+ - coverage/assets/
+
+
# Notify slack in the end
notify:slack:
stage: post-test
+ variables:
+ USE_DB: "false"
+ USE_BUNDLE_INSTALL: "false"
script:
- ./scripts/notify_slack.sh "#builds" "Build on \`$CI_BUILD_REF_NAME\` failed! Commit \`$(git log -1 --oneline)\` See <https://gitlab.com/gitlab-org/$(basename "$PWD")/commit/"$CI_BUILD_REF"/builds>"
when: on_failure
@@ -238,3 +263,18 @@ notify:slack:
- tags@gitlab-org/gitlab-ce
- master@gitlab-org/gitlab-ee
- tags@gitlab-org/gitlab-ee
+
+pages:
+ before_script: []
+ stage: pages
+ dependencies:
+ - coverage
+ script:
+ - mv public/ .public/
+ - mkdir public/
+ - mv coverage public/coverage-ruby
+ artifacts:
+ paths:
+ - public
+ only:
+ - master