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

rspec-foss-impact.gitlab-ci.yml.erb « rails « ci « .gitlab - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: dc469c302070f976ab8b0481e1163232a221a454 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
# RSpec FOSS impact pipeline loaded dynamically by script: scripts/generate_rspec_pipeline.rb

include:
  - local: .gitlab/ci/rails/shared.gitlab-ci.yml

default:
  image: $DEFAULT_CI_IMAGE
  tags:
    - gitlab-org
  # Default job timeout set to 90m https://gitlab.com/gitlab-com/gl-infra/infrastructure/-/issues/10520
  timeout: 90m
  interruptible: true

stages:
  - test

dont-interrupt-me:
  extends: .rules:dont-interrupt
  stage: .pre
  interruptible: false
  script:
    - echo "This jobs makes sure this pipeline won't be interrupted! See https://docs.gitlab.com/ee/ci/yaml/#interruptible."

.base-rspec-foss-impact:
  extends: .rspec-base-pg14-as-if-foss
  needs:
    - pipeline: $PARENT_PIPELINE_ID
      job: detect-tests
    - pipeline: $PARENT_PIPELINE_ID
      job: setup-test-env
    - pipeline: $PARENT_PIPELINE_ID
      job: retrieve-tests-metadata
    - pipeline: $PARENT_PIPELINE_ID
      job: compile-test-assets as-if-foss
  rules:
    - when: always
  variables:
    RSPEC_TESTS_FILTER_FILE: "${RSPEC_MATCHING_TESTS_FOSS_PATH}"
    RSPEC_TESTS_MAPPING_ENABLED: "true"
  script:
    - !reference [.base-script, script]
    - rspec_paralellized_job "--tag ~quarantine --tag ~level:background_migration --tag ~zoekt"
  artifacts:
    expire_in: 7d
    paths:
      - "${RSPEC_MATCHING_TESTS_FOSS_PATH}"
      - tmp/capybara/

<% if rspec_files_per_test_level[:migration][:files].size > 0 %>
rspec migration foss-impact:
  extends: .base-rspec-foss-impact
<% if rspec_files_per_test_level[:migration][:parallelization] > 1 %>
  parallel: <%= rspec_files_per_test_level[:migration][:parallelization] %>
<% end %>
  script:
    - !reference [.base-script, script]
    - rspec_paralellized_job "--tag ~quarantine --tag ~zoekt"
<% end %>

<% if rspec_files_per_test_level[:background_migration][:files].size > 0 %>
rspec background_migration foss-impact:
  extends: .base-rspec-foss-impact
<% if rspec_files_per_test_level[:background_migration][:parallelization] > 1 %>
  parallel: <%= rspec_files_per_test_level[:background_migration][:parallelization] %>
<% end %>
<% end %>

<% if rspec_files_per_test_level[:unit][:files].size > 0 %>
rspec unit foss-impact:
  extends: .base-rspec-foss-impact
<% if rspec_files_per_test_level[:unit][:parallelization] > 1 %>
  parallel: <%= rspec_files_per_test_level[:unit][:parallelization] %>
<% end %>
<% end %>

<% if rspec_files_per_test_level[:integration][:files].size > 0 %>
rspec integration foss-impact:
  extends: .base-rspec-foss-impact
<% if rspec_files_per_test_level[:integration][:parallelization] > 1 %>
  parallel: <%= rspec_files_per_test_level[:integration][:parallelization] %>
<% end %>
<% end %>

<% if rspec_files_per_test_level[:system][:files].size > 0 %>
rspec system foss-impact:
  extends: .base-rspec-foss-impact
<% if rspec_files_per_test_level[:system][:parallelization] > 1 %>
  parallel: <%= rspec_files_per_test_level[:system][:parallelization] %>
<% end %>
<% end %>