summaryrefslogtreecommitdiff
path: root/.gitlab
diff options
context:
space:
mode:
authormo khan <mo.khan@gmail.com>2020-04-20 13:48:40 -0600
committermo khan <mo.khan@gmail.com>2020-04-20 17:27:15 -0600
commitd70d40dec7ca4f3136624e916fc53bd7e905eccc (patch)
tree80b1fe4b52a8569fdaf9beed04ea92fe8450e7eb /.gitlab
parent5efca3ee64a616a47b602de2b262d06674259cfa (diff)
Move jobs to gitlab-org runners
* Explicity specify services in jobs that need them * Make gitlab-org the default tag * Download the image and ensure the download plus the unpack fits within the allotted time * Specify a depth of 10 commits * Cache bundled gems * Run unit tests in the built docker image * Use the created image in as many stages as possible
Diffstat (limited to '.gitlab')
-rw-r--r--.gitlab/test.yml38
1 files changed, 22 insertions, 16 deletions
diff --git a/.gitlab/test.yml b/.gitlab/test.yml
index 22147eb..5059269 100644
--- a/.gitlab/test.yml
+++ b/.gitlab/test.yml
@@ -2,7 +2,12 @@ size:
image: docker:stable
stage: test
allow_failure: true # temporary until we can shrink the image size.
+ services:
+ - docker:stable-dind
+ tags: [gitlab-org-docker]
timeout: 3 minutes
+ variables:
+ GIT_STRATEGY: none
script:
- docker login -u gitlab-ci-token -p $CI_JOB_TOKEN $CI_REGISTRY
- docker pull $TMP_IMAGE
@@ -20,57 +25,58 @@ lint:
.rspec:
stage: test
script:
- - ./bin/test $RSPEC_DIR --format RspecJunitFormatter --out rspec.xml
+ - bash -lc './bin/test $RSPEC_DIR --format RspecJunitFormatter --out rspec.xml'
+ variables:
+ BUNDLE_JOBS: '2'
+ BUNDLE_PATH: 'vendor/bundle'
+ GIT_DEPTH: "10"
+ GIT_STRATEGY: fetch
+ cache:
+ key: ${CI_COMMIT_REF_SLUG}
+ paths:
+ - vendor/bundle
artifacts:
paths:
- rspec.xml
reports:
junit: rspec.xml
-.integration:
- extends: .rspec
- image:
- name: $TMP_IMAGE
- entrypoint: [""]
- script:
- - bash -lc './bin/test $RSPEC_DIR --format RspecJunitFormatter --out rspec.xml'
-
unit:
extends: .rspec
variables:
RSPEC_DIR: spec/unit
integration-dotnet:
- extends: .integration
+ extends: .rspec
variables:
RSPEC_DIR: spec/integration/dotnet
integration-go:
- extends: .integration
+ extends: .rspec
variables:
RSPEC_DIR: spec/integration/go
integration-java:
- extends: .integration
+ extends: .rspec
variables:
RSPEC_DIR: spec/integration/java
integration-js:
- extends: .integration
+ extends: .rspec
variables:
RSPEC_DIR: spec/integration/js
integration-php:
- extends: .integration
+ extends: .rspec
variables:
RSPEC_DIR: spec/integration/php
integration-python:
- extends: .integration
+ extends: .rspec
variables:
RSPEC_DIR: spec/integration/python
integration-ruby:
- extends: .integration
+ extends: .rspec
variables:
RSPEC_DIR: spec/integration/ruby