gitlab-org--gitlab-foss/.gitlab/ci/qa.gitlab-ci.yml

86 lines
2.4 KiB
YAML

# Make sure to update all the similar conditions in other CI config files if you modify these conditions
.if-canonical-gitlab-and-merge-request: &if-canonical-gitlab-and-merge-request
if: '$CI_SERVER_HOST == "gitlab.com" && $CI_PROJECT_NAMESPACE =~ /^gitlab-org($|\/)/ && $CI_MERGE_REQUEST_IID'
# Make sure to update all the similar patterns in other CI config files if you modify these patterns
.code-patterns: &code-patterns
- ".gitlab/ci/**/*"
- ".{eslintignore,gitattributes,nvmrc,prettierrc,stylelintrc,yamllint}"
- ".{codeclimate,eslintrc,gitlab-ci,haml-lint,haml-lint_todo,rubocop,rubocop_todo,scss-lint}.yml"
- ".csscomb.json"
- "Dockerfile.assets"
- "*_VERSION"
- "Gemfile{,.lock}"
- "Rakefile"
- "{babel.config,jest.config}.js"
- "config.ru"
- "{package.json,yarn.lock}"
- "{,ee/}{app,bin,config,db,haml_lint,lib,locale,public,scripts,symbol,vendor}/**/*"
- "doc/api/graphql/reference/*" # Files in this folder are auto-generated
# Make sure to update all the similar patterns in other CI config files if you modify these patterns
.qa-patterns: &qa-patterns
- ".dockerignore"
- "qa/**/*"
.qa-job-base:
extends:
- .default-tags
- .default-retry
- .default-only
- .only:changes-code-qa
stage: test
dependencies: []
cache:
key: "qa-framework-jobs:v1"
paths:
- vendor/ruby
before_script:
- cd qa/
- bundle install --clean --jobs=$(nproc) --path=vendor --retry=3 --quiet
- bundle check
qa:internal:
extends: .qa-job-base
script:
- bundle exec rspec
qa:selectors:
extends: .qa-job-base
script:
- bundle exec bin/qa Test::Sanity::Selectors
qa:selectors-foss:
extends:
- qa:selectors
- .only-ee-as-if-foss
.package-and-qa-base:
image: ruby:2.6-alpine
stage: qa
dependencies: []
retry: 0
script:
- source scripts/utils.sh
- install_gitlab_gem
- ./scripts/trigger-build omnibus
package-and-qa:
extends: .package-and-qa-base
rules:
- <<: *if-canonical-gitlab-and-merge-request
changes: *qa-patterns
when: on_success
- <<: *if-canonical-gitlab-and-merge-request
changes: *code-patterns
when: manual
needs: ["build-qa-image", "gitlab:assets:compile pull-cache"]
allow_failure: true
schedule:package-and-qa:
extends:
- .package-and-qa-base
- .default-only
- .only:variables_refs-canonical-dot-com-schedules
needs: ["build-qa-image", "gitlab:assets:compile pull-cache"]
allow_failure: true