Commit bbb7e353 authored by James Lopez's avatar James Lopez

Merge branch 'fix-coverage-report' into 'master'

Fix coverage report [RUN ALL RSPEC]

Closes gitlab-org/quality/team-tasks#557

See merge request gitlab-org/gitlab!36291
parents a4b273fc 4b72d75a
...@@ -40,6 +40,9 @@ ...@@ -40,6 +40,9 @@
.if-merge-request-title-update-caches: &if-merge-request-title-update-caches .if-merge-request-title-update-caches: &if-merge-request-title-update-caches
if: '$CI_MERGE_REQUEST_TITLE =~ /UPDATE CACHE/' if: '$CI_MERGE_REQUEST_TITLE =~ /UPDATE CACHE/'
.if-merge-request-title-run-all-rspec: &if-merge-request-title-run-all-rspec
if: '$CI_MERGE_REQUEST_TITLE =~ /RUN ALL RSPEC/'
.if-security-merge-request: &if-security-merge-request .if-security-merge-request: &if-security-merge-request
if: '$CI_PROJECT_NAMESPACE == "gitlab-org/security" && $CI_MERGE_REQUEST_IID' if: '$CI_PROJECT_NAMESPACE == "gitlab-org/security" && $CI_MERGE_REQUEST_IID'
...@@ -440,22 +443,27 @@ ...@@ -440,22 +443,27 @@
.rails:rules:ee-and-foss-migration: .rails:rules:ee-and-foss-migration:
rules: rules:
- changes: *db-patterns - changes: *db-patterns
- <<: *if-merge-request-title-run-all-rspec
.rails:rules:ee-and-foss-unit: .rails:rules:ee-and-foss-unit:
rules: rules:
- changes: *backend-patterns - changes: *backend-patterns
- <<: *if-merge-request-title-run-all-rspec
.rails:rules:ee-and-foss-integration: .rails:rules:ee-and-foss-integration:
rules: rules:
- changes: *backend-patterns - changes: *backend-patterns
- <<: *if-merge-request-title-run-all-rspec
.rails:rules:ee-and-foss-system: .rails:rules:ee-and-foss-system:
rules: rules:
- changes: *code-backstage-patterns - changes: *code-backstage-patterns
- <<: *if-merge-request-title-run-all-rspec
.rails:rules:ee-and-foss-fast_spec_helper: .rails:rules:ee-and-foss-fast_spec_helper:
rules: rules:
- changes: ["config/**/*"] - changes: ["config/**/*"]
- <<: *if-merge-request-title-run-all-rspec
.rails:rules:default-refs-code-backstage-qa: .rails:rules:default-refs-code-backstage-qa:
rules: rules:
...@@ -467,24 +475,28 @@ ...@@ -467,24 +475,28 @@
- <<: *if-not-ee - <<: *if-not-ee
when: never when: never
- changes: *db-patterns - changes: *db-patterns
- <<: *if-merge-request-title-run-all-rspec
.rails:rules:ee-only-unit: .rails:rules:ee-only-unit:
rules: rules:
- <<: *if-not-ee - <<: *if-not-ee
when: never when: never
- changes: *backend-patterns - changes: *backend-patterns
- <<: *if-merge-request-title-run-all-rspec
.rails:rules:ee-only-integration: .rails:rules:ee-only-integration:
rules: rules:
- <<: *if-not-ee - <<: *if-not-ee
when: never when: never
- changes: *backend-patterns - changes: *backend-patterns
- <<: *if-merge-request-title-run-all-rspec
.rails:rules:ee-only-system: .rails:rules:ee-only-system:
rules: rules:
- <<: *if-not-ee - <<: *if-not-ee
when: never when: never
- changes: *code-backstage-patterns - changes: *code-backstage-patterns
- <<: *if-merge-request-title-run-all-rspec
.rails:rules:as-if-foss-migration: .rails:rules:as-if-foss-migration:
rules: rules:
...@@ -530,6 +542,7 @@ ...@@ -530,6 +542,7 @@
rules: rules:
- <<: *if-not-ee - <<: *if-not-ee
when: never when: never
- <<: *if-merge-request-title-run-all-rspec
- <<: *if-merge-request - <<: *if-merge-request
changes: *code-backstage-patterns changes: *code-backstage-patterns
- <<: *if-master-refs - <<: *if-master-refs
...@@ -556,6 +569,7 @@ ...@@ -556,6 +569,7 @@
- <<: *if-not-ee - <<: *if-not-ee
when: never when: never
- <<: *if-master-schedule-2-hourly - <<: *if-master-schedule-2-hourly
- <<: *if-merge-request-title-run-all-rspec
.rails:rules:master-schedule-nightly--code-backstage: .rails:rules:master-schedule-nightly--code-backstage:
rules: rules:
......
...@@ -387,6 +387,11 @@ We follow the [PostgreSQL versions shipped with Omnibus GitLab](https://docs.git ...@@ -387,6 +387,11 @@ We follow the [PostgreSQL versions shipped with Omnibus GitLab](https://docs.git
Consult [GitLab tests in the Continuous Integration (CI) context](testing_guide/ci.md) Consult [GitLab tests in the Continuous Integration (CI) context](testing_guide/ci.md)
for more information. for more information.
We have dedicated jobs for each [testing level](testing_guide/testing_levels.md) and each job runs depending on the
changes made in your merge request.
If you want to force all the RSpec jobs to run regardless of your changes, you can include `RUN ALL RSPEC` in your merge
request title.
### Review app jobs ### Review app jobs
Consult the [Review Apps](testing_guide/review_apps.md) dedicated page for more information. Consult the [Review Apps](testing_guide/review_apps.md) dedicated page for more information.
......
...@@ -47,7 +47,7 @@ module SimpleCovEnv ...@@ -47,7 +47,7 @@ module SimpleCovEnv
def configure_profile def configure_profile
SimpleCov.configure do SimpleCov.configure do
load_profile 'test_frameworks' load_profile 'test_frameworks'
track_files '{app,config,danger,db,haml_lint,lib,qa,rubocop,scripts,tooling}/**/*.rb' track_files '{app,config/initializers,config/initializers_before_autoloader,db/post_migrate,haml_lint,lib,rubocop,tooling}/**/*.rb'
add_filter '/vendor/ruby/' add_filter '/vendor/ruby/'
add_filter '/app/controllers/sherlock/' add_filter '/app/controllers/sherlock/'
...@@ -73,8 +73,7 @@ module SimpleCovEnv ...@@ -73,8 +73,7 @@ module SimpleCovEnv
add_group 'Initializers', %w[config/initializers config/initializers_before_autoloader] # Matches EE files as well add_group 'Initializers', %w[config/initializers config/initializers_before_autoloader] # Matches EE files as well
add_group 'Migrations', %w[db/migrate db/optional_migrations db/post_migrate] # Matches EE files as well add_group 'Migrations', %w[db/migrate db/optional_migrations db/post_migrate] # Matches EE files as well
add_group 'Libraries', %w[/lib /ee/lib] add_group 'Libraries', %w[/lib /ee/lib]
add_group 'Tooling', %w[/danger /haml_lint /rubocop /scripts /tooling] add_group 'Tooling', %w[/haml_lint /rubocop /tooling]
add_group 'QA', '/qa'
merge_timeout 365.days merge_timeout 365.days
end end
......
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