diff options
Diffstat (limited to '.gitlab/ci/rails.gitlab-ci.yml')
-rw-r--r-- | .gitlab/ci/rails.gitlab-ci.yml | 58 |
1 files changed, 46 insertions, 12 deletions
diff --git a/.gitlab/ci/rails.gitlab-ci.yml b/.gitlab/ci/rails.gitlab-ci.yml index 29534e40a14..346fa47cbb5 100644 --- a/.gitlab/ci/rails.gitlab-ci.yml +++ b/.gitlab/ci/rails.gitlab-ci.yml @@ -6,8 +6,9 @@ .use-pg-10: &use-pg-10 services: - - postgres:10.7 - - redis:alpine + - name: postgres:10.7 + command: ["postgres", "-c", "fsync=off", "-c", "synchronous_commit=off", "-c", "full_page_writes=off"] + - name: redis:alpine .use-mysql: &use-mysql services: @@ -52,8 +53,10 @@ script: - JOB_NAME=( $CI_JOB_NAME ) - TEST_TOOL=${JOB_NAME[0]} - - export KNAPSACK_REPORT_PATH=knapsack/${CI_PROJECT_NAME}/${TEST_TOOL}_node_${CI_NODE_INDEX}_${CI_NODE_TOTAL}_report.json - - export KNAPSACK_GENERATE_REPORT=true + - TEST_LEVEL=${JOB_NAME[1]} + - DATABASE=${JOB_NAME[2]} + - export KNAPSACK_REPORT_PATH=knapsack/${CI_PROJECT_NAME}/${TEST_TOOL}_${TEST_LEVEL}_${DATABASE}_node_${CI_NODE_INDEX}_${CI_NODE_TOTAL}_report.json + - export KNAPSACK_GENERATE_REPORT=true KNAPSACK_LOG_LEVEL=debug KNAPSACK_TEST_DIR=spec - export SUITE_FLAKY_RSPEC_REPORT_PATH=${FLAKY_RSPEC_SUITE_REPORT_PATH} - export FLAKY_RSPEC_REPORT_PATH=rspec_flaky/all_${TEST_TOOL}_${CI_NODE_INDEX}_${CI_NODE_TOTAL}_report.json - export NEW_FLAKY_RSPEC_REPORT_PATH=rspec_flaky/new_${TEST_TOOL}_${CI_NODE_INDEX}_${CI_NODE_TOTAL}_report.json @@ -63,7 +66,10 @@ - '[[ -f $FLAKY_RSPEC_REPORT_PATH ]] || echo "{}" > ${FLAKY_RSPEC_REPORT_PATH}' - '[[ -f $NEW_FLAKY_RSPEC_REPORT_PATH ]] || echo "{}" > ${NEW_FLAKY_RSPEC_REPORT_PATH}' - scripts/gitaly-test-spawn - - knapsack rspec "--color --format documentation --format RspecJunitFormatter --out junit_rspec.xml" + - date + - 'export KNAPSACK_TEST_FILE_PATTERN=$(ruby -r./lib/quality/test_level.rb -e "puts Quality::TestLevel.new.pattern(:${TEST_LEVEL})")' + - knapsack rspec "--color --format documentation --format RspecJunitFormatter --out junit_rspec.xml --tag level:${TEST_LEVEL} --tag ~geo" + - date artifacts: expire_in: 31d when: always @@ -140,19 +146,47 @@ setup-test-env: except: - /(^docs[\/-].*|.*-docs$)/ -rspec-pg: +rspec unit pg: <<: *rspec-metadata-pg - parallel: 50 + parallel: 20 -rspec-pg-10: +rspec integration pg: + <<: *rspec-metadata-pg + parallel: 6 + +rspec system pg: + <<: *rspec-metadata-pg + parallel: 24 + +rspec unit pg-10: <<: *rspec-metadata-pg-10 <<: *only-schedules-master - parallel: 50 + parallel: 20 + +rspec integration pg-10: + <<: *rspec-metadata-pg-10 + <<: *only-schedules-master + parallel: 6 + +rspec system pg-10: + <<: *rspec-metadata-pg-10 + <<: *only-schedules-master + parallel: 24 + +rspec unit mysql: + <<: *rspec-metadata-mysql + <<: *only-schedules-master + parallel: 20 + +rspec integration mysql: + <<: *rspec-metadata-mysql + <<: *only-schedules-master + parallel: 6 -rspec-mysql: +rspec system mysql: <<: *rspec-metadata-mysql <<: *only-schedules-master - parallel: 50 + parallel: 24 rspec-fast-spec-helper: <<: *rspec-metadata-pg @@ -164,7 +198,7 @@ rspec-fast-spec-helper: script: - export CACHE_CLASSES=true - scripts/gitaly-test-spawn - - bin/rspec --color --format documentation --tag quarantine spec/ + - bin/rspec --color --format documentation --tag quarantine -- spec/ rspec-pg-quarantine: <<: *rspec-metadata-pg |