Skip to content
Snippets Groups Projects
Commit 4833f247 authored by jurgenhaas's avatar jurgenhaas
Browse files

Further improve settings for extra tests from GitLab

parent c220cae4
No related branches found
No related tags found
No related merge requests found
......@@ -12,6 +12,8 @@ include:
- default
variables:
GIT_STRATEGY: none
dependencies:
- 'Build Site'
# ==================================== Code Quality
code_quality:
......@@ -19,40 +21,52 @@ code_quality:
variables:
GIT_STRATEGY: none
CODE_QUALITY_IMAGE: registry.lakedrops.com/docker/code-climate-drupal/code-climate-drupal
needs: ['Build Site']
artifacts:
paths:
- gl-code-quality-report.json
paths: ['gl-code-quality-report.json']
rules:
- if: '$DISABLE_GITLAB_CI_TEST_CODE_QUALITY != "1"'
# ==================================== SAST
bandit-sast:
<<: *test_gitlab_default
artifacts:
paths: ['gl-sast-report.json']
rules:
- if: '$DISABLE_GITLAB_CI_TEST_BANDIT_SAST != "1"'
eslint-sast:
<<: *test_gitlab_default
artifacts:
paths: ['gl-sast-report.json']
rules:
- if: '$DISABLE_GITLAB_CI_TEST_ESLINT_SAST != "1"'
nodejs-scan-sast:
<<: *test_gitlab_default
artifacts:
paths: ['gl-sast-report.json']
rules:
- if: '$DISABLE_GITLAB_CI_TEST_NODEJS_SCAN_SAST != "1"'
phpcs-security-audit-sast:
<<: *test_gitlab_default
artifacts:
paths: ['gl-sast-report.json']
rules:
- if: '$DISABLE_GITLAB_CI_TEST_PHPCS_SECURITY_AUDIT_SAST != "1"'
semgrep-sast:
<<: *test_gitlab_default
artifacts:
paths: ['gl-sast-report.json']
rules:
- if: '$DISABLE_GITLAB_CI_TEST_SEMGREP_SAST != "1"'
# ==================================== Secret Detection
secret_detection:
<<: *test_gitlab_default
artifacts:
paths: ['gl-secret-detection-report.json']
rules:
- if: '$DISABLE_GITLAB_CI_TEST_SECRET_DETECTION != "1"'
......@@ -2,40 +2,36 @@
stage: test
tags:
- default
image: registry.lakedrops.com/docker/gitlab-drupal-ci:php-${PHP_MAJOR_VERSION}.${PHP_MINOR_VERSION}
variables:
GIT_STRATEGY: none
dependencies:
- 'Build Site'
Test Code Style:
<<: *test_lakedrops_default
image: registry.lakedrops.com/docker/gitlab-drupal-ci:php-${PHP_MAJOR_VERSION}.${PHP_MINOR_VERSION}
script:
- if [[ -f phpcs.xml ]]; then rm phpcs.xml; fi
- ahoy test phpcs -- --report=xml --report-file=/tmp/phpcs.xml
after_script:
- docker cp ${COMPOSE_PROJECT_NAME}-php-1:/tmp/phpcs.xml phpcs.xml
retry: 1
artifacts:
name: phpcs
when: always
paths:
- phpcs.xml
dependencies:
- 'Build Site'
rules:
- if: '$DISABLE_CI_TEST_CODESTYLE != "1"'
Test PHPUnit:
<<: *test_lakedrops_default
stage: test
image: registry.lakedrops.com/docker/gitlab-drupal-ci:php-${PHP_MAJOR_VERSION}.${PHP_MINOR_VERSION}
script:
- if [[ -f junit.xml ]]; then rm junit.xml; fi
- if [[ -f testdox.html ]]; then rm testdox.html; fi
- ahoy test phpunit -- --log-junit /tmp/junit.xml --testdox-html testdox.html
- ahoy test phpunit -- --log-junit /tmp/junit.xml --testdox-html /tmp/testdox.html
after_script:
- docker cp ${COMPOSE_PROJECT_NAME}-php-1:/tmp/junit.xml junit.xml
- docker cp ${COMPOSE_PROJECT_NAME}-php-1:/tmp/testdox.html testdox.html
retry: 1
artifacts:
name: phpunit
when: always
......@@ -44,37 +40,29 @@ Test PHPUnit:
- testdox.html
reports:
junit: junit.xml
dependencies:
- 'Build Site'
rules:
- if: '$DISABLE_CI_TEST_PHPUNIT != "1"'
Test Behat:
<<: *test_lakedrops_default
image: registry.lakedrops.com/docker/gitlab-drupal-ci:php-${PHP_MAJOR_VERSION}.${PHP_MINOR_VERSION}
script:
- if [[ -f behat.xml ]]; then rm behat.xml; fi
- ahoy behat update
- ahoy behat exec -- --format junit --out /tmp
after_script:
- docker cp ${COMPOSE_PROJECT_NAME}-php-1:/tmp/default.xml behat.xml
retry: 1
artifacts:
name: behat
when: always
paths:
- behat.xml
dependencies:
- 'Build Site'
rules:
- if: '$DISABLE_CI_TEST_BEHAT != "1"'
Test Backstop:
<<: *test_lakedrops_default
image: registry.lakedrops.com/docker/gitlab-drupal-ci:php-${PHP_MAJOR_VERSION}.${PHP_MINOR_VERSION}
script:
- backstop test
retry: 1
artifacts:
name: backstop
when: always
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment