Commit dea33ff4 authored by Rémy Coutable's avatar Rémy Coutable

Run tests against PG10 by default

We also now run tests against:

- PG9 in nightly pipelines only (vs MR, master, and nightly before)
- PG11 in master and nightly pipelines (vs nightly pipelines before)
Signed-off-by: default avatarRémy Coutable <remy@rymai.me>
parent c056c7bf
image: "registry.gitlab.com/gitlab-org/gitlab-build-images:ruby-2.6.5-golang-1.14-git-2.26-lfs-2.9-chrome-73.0-node-12.x-yarn-1.21-postgresql-9.6-graphicsmagick-1.3.34"
image: "registry.gitlab.com/gitlab-org/gitlab-build-images:ruby-2.6.5-golang-1.14-git-2.26-lfs-2.9-chrome-73.0-node-12.x-yarn-1.21-postgresql-10-graphicsmagick-1.3.34"
stages:
- sync
......
......@@ -3,9 +3,9 @@
- .default-retry
- .default-cache
- .default-before_script
- .use-pg9
- .use-pg10
stage: test
needs: ["setup-test-env"]
needs: ["setup-test-env pg10"]
variables:
FIXTURE_PATH: "db/fixtures/development"
SEED_CYCLE_ANALYTICS: "true"
......@@ -26,7 +26,7 @@ run-dev-fixtures-ee:
extends:
- .run-dev-fixtures
- .dev-fixtures:rules:ee-only
- .use-pg9-ee
- .use-pg10-ee
script:
- scripts/gitaly-test-spawn
- cp ee/db/fixtures/development/* $FIXTURE_PATH
......
......@@ -66,9 +66,9 @@ graphql-reference-verify:
- .default-cache
- .default-before_script
- .docs:rules:graphql-reference-verify
- .use-pg9
- .use-pg10
stage: test
needs: ["setup-test-env"]
needs: ["setup-test-env pg10"]
script:
- bundle exec rake gitlab:graphql:check_docs
- bundle exec rake gitlab:graphql:check_schema
......@@ -135,13 +135,9 @@ compile-assets pull-cache as-if-foss:
- .default-retry
- .default-cache
- .default-before_script
- .use-pg9
- .use-pg10
stage: fixtures
needs:
- job: "setup-test-env"
artifacts: true
- job: "compile-assets pull-cache"
artifacts: true
needs: ["setup-test-env pg10", "compile-assets pull-cache"]
script:
- date
- scripts/gitaly-test-spawn
......@@ -270,7 +266,6 @@ coverage-frontend:
.qa-frontend-node:
extends:
- .default-retry
- .default-cache
- .frontend:rules:qa-frontend-node
stage: test
dependencies: []
......@@ -300,7 +295,7 @@ webpack-dev-server:
- .default-cache
- .frontend:rules:default-frontend-jobs
stage: test
needs: ["setup-test-env", "compile-assets pull-cache"]
needs: ["setup-test-env pg10", "compile-assets pull-cache"]
variables:
WEBPACK_MEMORY_TEST: "true"
WEBPACK_VENDOR_DLL: "true"
......
......@@ -21,7 +21,7 @@
# Jobs that only need to pull cache
.default-cache:
cache:
key: "debian-stretch-ruby-2.6.5-pg9.6-node-12.x"
key: "debian-stretch-ruby-2.6.5-pg10-node-12.x"
paths:
- .go/pkg/mod
- vendor/ruby
......@@ -30,12 +30,15 @@
policy: pull
.use-pg9:
image: "registry.gitlab.com/gitlab-org/gitlab-build-images:ruby-2.6.5-golang-1.12-git-2.24-lfs-2.9-chrome-73.0-node-12.x-yarn-1.21-postgresql-9.6-graphicsmagick-1.3.34"
services:
- name: postgres:9.6.17
command: ["postgres", "-c", "fsync=off", "-c", "synchronous_commit=off", "-c", "full_page_writes=off"]
- name: redis:alpine
variables:
POSTGRES_HOST_AUTH_METHOD: trust
cache:
key: "debian-stretch-ruby-2.6.5-pg9-node-12.x"
.use-pg10:
image: "registry.gitlab.com/gitlab-org/gitlab-build-images:ruby-2.6.5-golang-1.14-git-2.26-lfs-2.9-chrome-73.0-node-12.x-yarn-1.21-postgresql-10-graphicsmagick-1.3.34"
......@@ -45,6 +48,8 @@
- name: redis:alpine
variables:
POSTGRES_HOST_AUTH_METHOD: trust
cache:
key: "debian-stretch-ruby-2.6.5-pg10-node-12.x"
.use-pg11:
image: "registry.gitlab.com/gitlab-org/gitlab-build-images:ruby-2.6.5-golang-1.14-git-2.26-lfs-2.9-chrome-73.0-node-12.x-yarn-1.21-postgresql-11-graphicsmagick-1.3.34"
......@@ -54,8 +59,11 @@
- name: redis:alpine
variables:
POSTGRES_HOST_AUTH_METHOD: trust
cache:
key: "debian-stretch-ruby-2.6.5-pg11-node-12.x"
.use-pg9-ee:
image: "registry.gitlab.com/gitlab-org/gitlab-build-images:ruby-2.6.5-golang-1.12-git-2.24-lfs-2.9-chrome-73.0-node-12.x-yarn-1.21-postgresql-9.6-graphicsmagick-1.3.34"
services:
- name: postgres:9.6.17
command: ["postgres", "-c", "fsync=off", "-c", "synchronous_commit=off", "-c", "full_page_writes=off"]
......@@ -63,6 +71,8 @@
- name: elasticsearch:6.4.2
variables:
POSTGRES_HOST_AUTH_METHOD: trust
cache:
key: "debian-stretch-ruby-2.6.5-pg9-node-12.x"
.use-pg10-ee:
image: "registry.gitlab.com/gitlab-org/gitlab-build-images:ruby-2.6.5-golang-1.14-git-2.26-lfs-2.9-chrome-73.0-node-12.x-yarn-1.21-postgresql-10-graphicsmagick-1.3.34"
......@@ -73,6 +83,8 @@
- name: elasticsearch:6.4.2
variables:
POSTGRES_HOST_AUTH_METHOD: trust
cache:
key: "debian-stretch-ruby-2.6.5-pg10-node-12.x"
.use-pg11-ee:
image: "registry.gitlab.com/gitlab-org/gitlab-build-images:ruby-2.6.5-golang-1.14-git-2.26-lfs-2.9-chrome-73.0-node-12.x-yarn-1.21-postgresql-11-graphicsmagick-1.3.34"
......@@ -83,6 +95,8 @@
- name: elasticsearch:6.4.2
variables:
POSTGRES_HOST_AUTH_METHOD: trust
cache:
key: "debian-stretch-ruby-2.6.5-pg11-node-12.x"
.as-if-foss:
variables:
......
......@@ -8,9 +8,7 @@
memory-static:
extends: .only-code-memory-job-base
stage: test
needs:
- job: setup-test-env
artifacts: true
needs: ["setup-test-env pg10"]
variables:
SETUP_DB: "false"
script:
......@@ -40,11 +38,7 @@ memory-on-boot:
- .only-code-memory-job-base
- .use-pg10
stage: test
needs:
- job: setup-test-env
artifacts: true
- job: compile-assets pull-cache
artifacts: true
needs: ["setup-test-env pg10", "compile-assets pull-cache"]
variables:
NODE_ENV: "production"
RAILS_ENV: "production"
......
pages:
extends:
- .default-retry
- .default-cache
- .pages:rules
stage: pages
dependencies: ["rspec:coverage", "karma", "gitlab:assets:compile pull-cache"]
......
This diff is collapsed.
......@@ -361,6 +361,7 @@
- <<: *if-master-refs
changes: *code-backstage-patterns
when: on_success
- changes: [".gitlab/ci/rails.gitlab-ci.yml"]
.rails:rules:master-refs-code-backstage-ee-only:
rules:
......@@ -369,12 +370,23 @@
- <<: *if-master-refs
changes: *code-backstage-patterns
when: on_success
- changes: [".gitlab/ci/rails.gitlab-ci.yml"]
.rails:rules:nightly-master-refs-code-backstage:
rules:
- <<: *if-nightly-master-schedule
changes: *code-backstage-patterns
when: on_success
- changes: [".gitlab/ci/rails.gitlab-ci.yml"]
.rails:rules:nightly-master-refs-code-backstage-ee-only:
rules:
- <<: *if-not-ee
when: never
- <<: *if-nightly-master-schedule
changes: *code-backstage-patterns
when: on_success
- changes: [".gitlab/ci/rails.gitlab-ci.yml"]
.rails:rules:ee-only:
rules:
......
......@@ -7,9 +7,7 @@ cache gems:
- .default-before_script
- .setup:rules:cache-gems
stage: test
needs:
- job: setup-test-env
artifacts: true
needs: ["setup-test-env pg10"]
variables:
SETUP_DB: "false"
script:
......
......@@ -176,7 +176,7 @@ graph RL;
O[coverage-frontend];
N["pages (master only)"];
Q[package-and-qa];
S["RSpec<br/>(e.g. rspec unit pg9)"]
S["RSpec<br/>(e.g. rspec unit pg10)"]
T[retrieve-tests-metadata];
QA["qa:internal, qa:selectors"];
QA2["qa:internal-as-if-foss, qa:selectors-as-if-foss<br/>(EE default refs only)"];
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment