Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to '.gitlab/ci/rails.gitlab-ci.yml')
-rw-r--r--.gitlab/ci/rails.gitlab-ci.yml86
1 files changed, 32 insertions, 54 deletions
diff --git a/.gitlab/ci/rails.gitlab-ci.yml b/.gitlab/ci/rails.gitlab-ci.yml
index 1d2f94b616d..8a4ea690c60 100644
--- a/.gitlab/ci/rails.gitlab-ci.yml
+++ b/.gitlab/ci/rails.gitlab-ci.yml
@@ -29,7 +29,9 @@
GITLAB_USE_MODEL_LOAD_BALANCING: "true"
.rspec-base:
- extends: .rails-job-base
+ extends:
+ - .rails-job-base
+ - .base-artifacts
stage: test
variables:
RUBY_GC_MALLOC_LIMIT: 67108864
@@ -40,6 +42,8 @@
script:
- !reference [.base-script, script]
- rspec_paralellized_job "--tag ~quarantine --tag ~geo --tag ~level:migration"
+
+.base-artifacts:
artifacts:
expire_in: 31d
when: always
@@ -48,16 +52,16 @@
- crystalball/
- deprecations/
- knapsack/
- - rspec_flaky/
- - rspec_profiling/
+ - rspec/
- tmp/capybara/
- - tmp/memory_test/
- log/*.log
reports:
- junit: junit_rspec.xml
+ junit: ${JUNIT_RESULT_FILE}
.rspec-base-migration:
- extends: .rails:rules:ee-and-foss-migration
+ extends:
+ - .base-artifacts
+ - .rails:rules:ee-and-foss-migration
script:
- !reference [.base-script, script]
- rspec_paralellized_job "--tag ~quarantine --tag ~geo --tag level:migration"
@@ -307,6 +311,8 @@ rspec system pg12:
- .rspec-base-pg12
- .rails:rules:ee-and-foss-system
- .rspec-system-parallel
+ variables:
+ DEBUG_GITLAB_TRANSACTION_STACK: "true"
rspec system pg12 minimal:
extends:
@@ -335,13 +341,9 @@ rspec fast_spec_helper:
- .rspec-base-pg12
- .rails:rules:ee-and-foss-fast_spec_helper
script:
- - bin/rspec spec/fast_spec_helper.rb
-
-rspec fast_spec_helper minimal:
- extends:
- - rspec fast_spec_helper
- - .minimal-rspec-tests
- - .rails:rules:ee-and-foss-fast_spec_helper:minimal
+ - fast_spec_helper_specs=$(git grep -l -E '^require.*fast_spec_helper')
+ # Load fast_spec_helper as well just in case there are no specs available.
+ - bin/rspec --dry-run spec/fast_spec_helper.rb $fast_spec_helper_specs
db:rollback:
extends: .db-job-base
@@ -427,6 +429,13 @@ db:check-migrations-decomposed:
- .decomposed-database
- .rails:rules:decomposed-databases
+db:migrate-non-superuser:
+ extends:
+ - .db-job-base
+ - .rails:rules:ee-and-foss-mr-with-migration
+ script:
+ - bundle exec rake gitlab:db:reset_as_non_superuser
+
db:gitlabcom-database-testing:
extends: .rails:rules:db:gitlabcom-database-testing
stage: test
@@ -436,7 +445,7 @@ db:gitlabcom-database-testing:
script:
- source scripts/utils.sh
- install_gitlab_gem
- - ./scripts/trigger-build gitlab-com-database-testing
+ - ./scripts/trigger-build.rb gitlab-com-database-testing
gitlab:setup:
extends: .db-job-base
@@ -554,7 +563,6 @@ rspec:coverage:
- rspec-ee integration pg12 geo minimal
- rspec-ee system pg12 geo minimal
# Memory jobs
- - memory-static
- memory-on-boot
# As-if-FOSS jobs
- rspec migration pg12-as-if-foss
@@ -571,7 +579,6 @@ rspec:coverage:
- rspec system pg12-as-if-foss decomposed
script:
- run_timed_command "bundle exec scripts/merge-simplecov"
- - run_timed_command "bundle exec scripts/gather-test-memory-data"
coverage: '/LOC \((\d+\.\d+%)\) covered.$/'
artifacts:
name: coverage
@@ -580,7 +587,6 @@ rspec:coverage:
- coverage/index.html
- coverage/assets/
- coverage/lcov/
- - tmp/memory_test/
reports:
cobertura: coverage/coverage.xml
@@ -621,54 +627,26 @@ rspec:feature-flags:
run_timed_command "bundle exec scripts/used-feature-flags";
fi
-rspec:skipped-flaky-tests-report:
+rspec:flaky-tests-report:
extends:
- .default-retry
- - .rails:rules:skipped-flaky-tests-report
- image: ruby:2.7-alpine
+ - .rails:rules:flaky-tests-report
stage: post-test
# We cannot use needs since it would mean needing 84 jobs (since most are parallelized)
# so we use `dependencies` here.
- dependencies:
- # FOSS/EE jobs
- - rspec migration pg12
- - rspec unit pg12
- - rspec integration pg12
- - rspec system pg12
- # FOSS/EE minimal jobs
- - rspec migration pg12 minimal
- - rspec unit pg12 minimal
- - rspec integration pg12 minimal
- - rspec system pg12 minimal
- # EE jobs
- - rspec-ee migration pg12
- - rspec-ee unit pg12
- - rspec-ee integration pg12
- - rspec-ee system pg12
- # EE minimal jobs
- - rspec-ee migration pg12 minimal
- - rspec-ee unit pg12 minimal
- - rspec-ee integration pg12 minimal
- - rspec-ee system pg12 minimal
- # Geo jobs
- - rspec-ee unit pg12 geo
- - rspec-ee integration pg12 geo
- - rspec-ee system pg12 geo
- # Geo minimal jobs
- - rspec-ee unit pg12 geo minimal
- - rspec-ee integration pg12 geo minimal
- - rspec-ee system pg12 geo minimal
+ dependencies: !reference ["rspec:coverage", "dependencies"]
variables:
- SKIPPED_FLAKY_TESTS_REPORT: skipped_flaky_tests_report.txt
+ SKIPPED_FLAKY_TESTS_REPORT_PATH: rspec/flaky/skipped_flaky_tests_report.txt
+ RETRIED_TESTS_REPORT_PATH: rspec/flaky/retried_tests_report.txt
before_script:
- - 'echo "SKIP_FLAKY_TESTS_AUTOMATICALLY: $SKIP_FLAKY_TESTS_AUTOMATICALLY"'
- - mkdir -p rspec_flaky
+ - source scripts/utils.sh
+ - source scripts/rspec_helpers.sh
script:
- - find rspec_flaky/ -type f -name 'skipped_flaky_tests_*_report.txt' -exec cat {} + >> "${SKIPPED_FLAKY_TESTS_REPORT}"
+ - generate_flaky_tests_reports
artifacts:
expire_in: 31d
paths:
- - ${SKIPPED_FLAKY_TESTS_REPORT}
+ - rspec/
# EE/FOSS: default refs (MRs, default branch, schedules) jobs #
#######################################################