|
| 1 | +- pipeline: "Pull Request Tests" |
| 2 | + events: |
| 3 | + - type: "PUSH" |
| 4 | + refs: |
| 5 | + - "refs/pull/*" |
| 6 | + trigger_conditions: |
| 7 | + - trigger_condition: "VAR_IS" |
| 8 | + trigger_variable_value: "false" |
| 9 | + trigger_variable_key: "BUDDY_EXECUTION_PULL_REQUEST_DRAFT" |
| 10 | + actions: |
| 11 | + - action: "Git Tests" |
| 12 | + type: "BUILD" |
| 13 | + working_directory: "/buddy/create-wordpress-project" |
| 14 | + docker_image_name: "alleyops/ci-resources" |
| 15 | + docker_image_tag: "8.2-fpm-wp" |
| 16 | + execute_commands: |
| 17 | + - "if [[ ! -z $(git ls-files -i --exclude-standard) ]]; then exit 1; fi" |
| 18 | + - "! git grep -E '<<<<<<< |>>>>>>> ' -- './*' ':(exclude)*/buddy.yml' ':(exclude).buddy/*'" |
| 19 | + volume_mappings: |
| 20 | + - "/:/buddy/create-wordpress-project" |
| 21 | + trigger_condition: "ALWAYS" |
| 22 | + shell: "BASH" |
| 23 | + - action: "PHP Tests" |
| 24 | + type: "BUILD" |
| 25 | + working_directory: "/buddy/create-wordpress-project" |
| 26 | + docker_image_name: "alleyops/ci-resources" |
| 27 | + docker_image_tag: "8.2-fpm-wp" |
| 28 | + execute_commands: |
| 29 | + - "composer install -q" |
| 30 | + - "curl -s https://raw.githubusercontent.com/alleyinteractive/mantle-ci/HEAD/install-wp-tests.sh | bash -s \"wordpress_unit_tests\" root root mysql" |
| 31 | + - "composer test" |
| 32 | + setup_commands: |
| 33 | + - "echo \"extension=memcache.so\" >> /usr/local/etc/php/conf.d/buddy.ini" |
| 34 | + services: |
| 35 | + - type: "MYSQL" |
| 36 | + version: "latest" |
| 37 | + connection: |
| 38 | + host: "mysql" |
| 39 | + port: 3306 |
| 40 | + user: "root" |
| 41 | + password: "root" |
| 42 | + db: "wordpress_unit_tests" |
| 43 | + - type: "MEMCACHED" |
| 44 | + version: "latest" |
| 45 | + connection: |
| 46 | + host: "memcached" |
| 47 | + port: 11211 |
| 48 | + volume_mappings: |
| 49 | + - "/:/buddy/create-wordpress-project" |
| 50 | + trigger_condition: "ALWAYS" |
| 51 | + shell: "BASH" |
| 52 | + variables: |
| 53 | + - key: "COMPOSER_HOME" |
| 54 | + value: "/buddy/create-wordpress-project/.composer" |
| 55 | + - key: "WP_CORE_DIR" |
| 56 | + value: "/buddy/create-wordpress-project/.buddy-tests/wordpress" |
| 57 | + - key: "WP_MULTISITE" |
| 58 | + value: "1" |
| 59 | + - key: "WP_TESTS_DIR" |
| 60 | + value: "/buddy/create-wordpress-project/.buddy-tests/wordpress-tests-lib" |
| 61 | + run_next_parallel: true |
| 62 | + - action: "Node Tests" |
| 63 | + type: "BUILD" |
| 64 | + working_directory: "/buddy/create-wordpress-project" |
| 65 | + docker_image_name: "library/node" |
| 66 | + docker_image_tag: "20" |
| 67 | + execute_commands: |
| 68 | + - "npm audit --audit-level=high --production --cache /buddy/create-wordpress-project/.npm" |
| 69 | + - "npm ci --cache /buddy/create-wordpress-project/.npm" |
| 70 | + - "npm run lint && npm run stylelint && npm run build && npm run test" |
| 71 | + volume_mappings: |
| 72 | + - "/:/buddy/create-wordpress-project" |
| 73 | + trigger_condition: "ALWAYS" |
| 74 | + shell: "BASH" |
0 commit comments