diff options
author | Nick Thomas <nick@gitlab.com> | 2018-08-28 11:24:56 +0200 |
---|---|---|
committer | Nick Thomas <nick@gitlab.com> | 2018-09-28 04:43:55 +0100 |
commit | c37020bb5ae66bfb7596e2b1b4f7b5c79203ecf3 (patch) | |
tree | b2794902bfd0e135db4fbc104e626bfbfc48df80 | |
parent | 1f8556b2f86d7954f86f4a9a58f586a838f8ae21 (diff) | |
download | gitlab-shell-c37020bb5ae66bfb7596e2b1b4f7b5c79203ecf3.tar.gz |
Run the Ruby specs in the "go:x.y" tests as well
Since the Go code now wraps the Ruby script, this makes sense and tests
the interaction of the two codebases. Over time, the number of Ruby
tests to run will approach 0.
-rw-r--r-- | .gitlab-ci.yml | 32 |
1 files changed, 25 insertions, 7 deletions
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 47514bd..9e6e1a1 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -6,9 +6,17 @@ before_script: - cp config.yml.example config.yml - bundle install -rspec: +.rspec_definition: &rspec_definition script: + # Skip the experimental Golang wrapper in the Ruby specs. These are now + # primarily regression tests for particular versions of Ruby. + # + # The full rspec suite is also run against each suppported golang version + - cp bin/gitlab-shell-ruby bin/gitlab-shell - bundle exec rspec --color --format d spec + +rspec: + <<: *rspec_definition tags: - ruby except: @@ -25,8 +33,7 @@ rubocop: #ruby 2.2 rspec:ruby2.2: image: ruby:2.2 - script: - - bundle exec rspec --color --format d spec + <<: *rspec_definition tags: - ruby except: @@ -35,8 +42,7 @@ rspec:ruby2.2: #ruby 2.1 rspec:ruby2.1: image: ruby:2.1 - script: - - bundle exec rspec --color --format d spec + <<: *rspec_definition tags: - ruby except: @@ -44,14 +50,22 @@ rspec:ruby2.1: .go: &go_definition before_script: - - apt-get update -qq && apt-get install -y ruby + - apt-get update -qq && apt-get install -y ruby ruby-dev - ruby -v + - export PATH=~/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/go/bin + - gem install --bindir /usr/local/bin bundler + - cp config.yml.example config.yml + - bundle install script: - go version - which go - bin/compile - support/go-test - support/go-format check + # Run the full Ruby test suite in the "go" tests. As more functionality is + # migrated into these tests and out of Ruby, the amount of work here will + # reduce + - bundle exec rspec --color --format d spec go:1.9: <<: *go_definition @@ -61,6 +75,10 @@ go:1.10: <<: *go_definition image: golang:1.10 +go:1.11: + <<: *go_definition + image: golang:1.10 + codequality: image: docker:stable variables: @@ -114,4 +132,4 @@ dependency_scanning: --volume /var/run/docker.sock:/var/run/docker.sock "registry.gitlab.com/gitlab-org/security-products/dependency-scanning:$SP_VERSION" /code artifacts: - paths: [gl-dependency-scanning-report.json]
\ No newline at end of file + paths: [gl-dependency-scanning-report.json] |