Skip to content
Snippets Groups Projects
Select Git revision
  • b00c8dfe6ac0487b93263d7090ba984f97ca8a63
  • master default protected
  • bugfix/vendor-excluded
  • feature/phpcs-editorconfig
  • 1.3.2
  • 1.3.1
  • 1.3.0
  • 1.2.8
  • 1.2.7
  • 1.2.6
  • 1.2.5
  • 1.2.4
  • 1.2.3
  • 1.2.2
  • 1.2.1
  • 1.2.0
  • 1.1.0
  • 1.1.0-beta1
  • 1.0.1
  • 1.0.0
  • 1.0.0-beta8
  • 1.0.0-beta7
  • 1.0.0-beta6
  • 1.0.0-beta5
24 results

README.md

Blame
  • unit.yml 2.00 KiB
    .template: &job-test-template
      tags:
        - unit
      stage: tests
      except:
        variables:
          - $IS_NPM_LIBRARY
      coverage: '/^\s*Lines:\s*\d+.\d+\%/'
      artifacts:
        paths:
          - tmp_artifacts/unit
        reports:
          junit: tmp_artifacts/unit/report.xml
      interruptible: true
    
    .template: &job-test-unit-template
      <<: *job-test-template
      image: gitlab.wpdesk.dev:5050/wpdesk/docker-tests/php-box:8.3.2
      before_script:
        - echo ${WPDESK_CI_VERSION}
        - php --version
        - echo "xdebug.mode=coverage" >> /usr/local/etc/php/conf.d/docker-php-ext-xdebug.ini
      script:
        - vendor/bin/phpunit  -d memory_limit=-1 --configuration phpunit-unit.xml --coverage-text --colors=never --log-junit tmp_artifacts/unit/report.xml --coverage-html tmp_artifacts/unit/coverage
      after_script:
        - 'if [[ ${REPORTPORTAL_AUTHORIZATION} && ${REPORTPORTAL_PROJECT} ]]; then curl -X POST "http://195.201.225.204:8080/api/v1/${REPORTPORTAL_PROJECT}/launch/import" -H "accept: */*" -H "Content-Type: multipart/form-data" -H "${REPORTPORTAL_AUTHORIZATION}" -F "file=file=@tmp_artifacts/unit/report.xml;type=text/xml;type=text/xml;filename=${CI_PROJECT_NAME}-${CI_COMMIT_REF_SLUG}-unit.xml"; fi'
    
    .template: &job-test-unit-template-fast
      <<: *job-test-template
      script:
        - echo ${WPDESK_CI_VERSION}
        - ls -l
        - php --version
        - vendor/bin/phpunit  -d memory_limit=-1 --configuration phpunit-unit.xml --no-coverage --log-junit tmp_artifacts/unit/report.xml
    
    unit test lastest:
      <<: *job-test-unit-template-fast
      only:
        refs:
          - devel
          - tags
      except:
        variables:
          - $IS_NPM_LIBRARY
    
    unit test lastest coverage:
      <<: *job-test-unit-template
      only:
        refs:
          - master
          - main
    
    unit test lastest manual:
      <<: *job-test-unit-template-fast
      when: manual
      allow_failure: true
      except:
        refs:
          - devel
          - tags
        variables:
          - $DISABLE_COVERAGE
    
    unit test lastest coverage manual:
      <<: *job-test-unit-template
      when: manual
      allow_failure: true
      except:
        refs:
          - master