diff options
author | Toon Claes <toon@gitlab.com> | 2022-11-02 17:19:43 +0300 |
---|---|---|
committer | Toon Claes <toon@gitlab.com> | 2022-11-02 17:19:43 +0300 |
commit | 8fffca5c27a448ed39013d5dedb13d9f5e6e7c37 (patch) | |
tree | 13df3dbf80d4a07970a1e8b55a8f406f4099e8c7 | |
parent | 04667f8e0c885d87da491e179cd0283bc3b966c9 (diff) | |
parent | fb183d9c42097a697751076d368d19ad3bc73c6d (diff) |
Merge branch 'pks-ci-analysis-stage' into 'master'
ci: Introduce "analyze" stage
See merge request https://gitlab.com/gitlab-org/gitaly/-/merge_requests/5001
Merged-by: Toon Claes <toon@gitlab.com>
Approved-by: Pavlo Strokov <pstrokov@gitlab.com>
Approved-by: Toon Claes <toon@gitlab.com>
Co-authored-by: Patrick Steinhardt <psteinhardt@gitlab.com>
-rw-r--r-- | .gitlab-ci.yml | 85 |
1 files changed, 45 insertions, 40 deletions
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index e0d40604a..4f9f593f9 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -1,6 +1,7 @@ stages: - build - test + - analyze - qa default: @@ -291,16 +292,53 @@ test:fips: when: manual allow_failure: true +test:macos: + needs: [] + stage: test + image: macos-12-xcode-14 + script: + - sw_vers + - go version + - pg_ctl --version + - ulimit -n 4096 # The default of 256 can lead to 'too many open files' errors when running parallel tests + - pg_ctl -D /usr/local/var/postgres start > /tmp/postgres.log + - pg_ctl status + - createdb -U $PGUSER $POSTGRES_DB + - brew install cmake + - make -j$(nproc) build prepare-tests + - make test-go + - *test_after_script + tags: + - shared-macos-amd64 + rules: + - if: $CI_PIPELINE_SOURCE == "schedule" + allow_failure: true + - when: manual + allow_failure: true + variables: + <<: *test_variables + PGDATA: /usr/local/var/postgres + PGHOST: localhost + PGUSER: gitlab + TEST_OPTIONS: "-timeout=20m" # a number of tests may exceed the default 10m + TEST_REPORT: go-tests-report.xml + TEST_FULL_OUTPUT: test-output.log + artifacts: + reports: + junit: ${TEST_REPORT} + when: always + expire_in: 1 week + verify:docs: image: registry.gitlab.com/gitlab-org/gitlab-docs/lint-markdown:alpine-3.16-vale-2.20.2-markdownlint-0.32.2-markdownlint2-0.5.1 needs: [] - stage: test + stage: analyze script: - make lint-docs verify: needs: [] - stage: test + stage: analyze cache: - *cache_deps_configuration - *cache_gems_configuration @@ -319,7 +357,7 @@ verify: dbschema: needs: [] - stage: test + stage: analyze cache: - *cache_deps_configuration - *cache_gems_configuration @@ -339,6 +377,7 @@ dbschema: semgrep-sast: needs: [] + stage: analyze cache: - *cache_go_configuration rules: @@ -350,6 +389,7 @@ semgrep-sast: license_scanning: needs: [] + stage: analyze rules: - if: $LICENSE_SCANNING_DISABLED when: never @@ -361,6 +401,7 @@ license_scanning: gemnasium-dependency_scanning: needs: [] + stage: analyze rules: - if: $DEPENDENCY_SCANNING_DISABLED when: never @@ -370,6 +411,7 @@ gemnasium-dependency_scanning: secret_detection: needs: [] + stage: analyze rules: - if: $SECRET_DETECTION_DISABLED when: never @@ -405,40 +447,3 @@ qa:nightly-praefect-migration-test: project: gitlab-org/quality/praefect-migration-testing rules: - if: '$CI_PIPELINE_SOURCE == "schedule"' - -test:macos: - needs: [] - stage: test - image: macos-12-xcode-14 - script: - - sw_vers - - go version - - pg_ctl --version - - ulimit -n 4096 # The default of 256 can lead to 'too many open files' errors when running parallel tests - - pg_ctl -D /usr/local/var/postgres start > /tmp/postgres.log - - pg_ctl status - - createdb -U $PGUSER $POSTGRES_DB - - brew install cmake - - make -j$(nproc) build prepare-tests - - make test-go - - *test_after_script - tags: - - shared-macos-amd64 - rules: - - if: $CI_PIPELINE_SOURCE == "schedule" - allow_failure: true - - when: manual - allow_failure: true - variables: - <<: *test_variables - PGDATA: /usr/local/var/postgres - PGHOST: localhost - PGUSER: gitlab - TEST_OPTIONS: "-timeout=20m" # a number of tests may exceed the default 10m - TEST_REPORT: go-tests-report.xml - TEST_FULL_OUTPUT: test-output.log - artifacts: - reports: - junit: ${TEST_REPORT} - when: always - expire_in: 1 week |