Skip to content

Bump tested up to version to 6.7 #216

Bump tested up to version to 6.7

Bump tested up to version to 6.7 #216

Workflow file for this run

name: Tests
on:
pull_request:
branches:
- master
jobs:
php:
name: PHP Unit
runs-on: ubuntu-latest
strategy:
matrix:
phpVersion: ["7.4", "8.3"]
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Setup Node
uses: actions/setup-node@v3
with:
node-version-file: '.nvmrc'
cache: 'yarn'
- name: Setup WP-CLI
uses: godaddy-wordpress/setup-wp-cli@1
- name: Install dependencies and build
run: |
npm i -g yarn
composer install
yarn install --immutable
yarn build
- name: Setup wp-env
uses: godaddy-wordpress/setup-wp-env@v1
with:
core: 'WordPress/WordPress#6.5'
phpVersion: ${{ matrix.phpVersion }}
plugins: '["https://downloads.wordpress.org/plugin/coblocks.zip","https://downloads.wordpress.org/plugin/woocommerce.zip"]'
themes: '["."]'
- name: Run tests
run: |
wp-env run tests-wordpress /var/www/html/wp-content/themes/go/vendor/bin/phpunit -c /var/www/html/wp-content/themes/go/phpunit.xml --verbose
js:
name: JS Unit
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Setup Node
uses: actions/setup-node@v3
with:
node-version-file: '.nvmrc'
cache: 'yarn'
- name: Install dependencies
run: yarn install --immutable
- name: Run tests
run: yarn run test:js
a11y:
name: Accessibility
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Setup wp-env
uses: godaddy-wordpress/setup-wp-env@v1
with:
core: 'WordPress/WordPress#6.5'
phpVersion: '8.3'
plugins: '["https://downloads.wordpress.org/plugin/coblocks.zip","https://downloads.wordpress.org/plugin/woocommerce.zip"]'
themes: '["."]'
- name: Setup Node
uses: actions/setup-node@v3
with:
node-version-file: '.nvmrc'
cache: 'yarn'
- name: Setup WP-CLI
uses: godaddy-wordpress/setup-wp-cli@1
- name: Install dependencies and build
run: |
npm i -g yarn
composer install
yarn install --immutable
yarn build
- name: Prepare tests
run: |
wp-env run cli wp db import wp-content/themes/go/.dev/tests/a11y-test-db.sql
- name: Run tests
run: |
A11Y=$(yarn test:a11y)
echo "$A11Y"
if [[ $A11Y != *"All accessibility tests have passed"* ]]; then
exit 1
fi
e2e:
name: Customizer E2E
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Setup wp-env
uses: godaddy-wordpress/setup-wp-env@v1
with:
core: 'WordPress/WordPress#6.5'
phpVersion: '8.3'
plugins: '["https://downloads.wordpress.org/plugin/coblocks.zip","https://downloads.wordpress.org/plugin/woocommerce.zip"]'
themes: '["."]'
- name: Setup Node
uses: actions/setup-node@v3
with:
node-version-file: '.nvmrc'
cache: 'yarn'
- name: Setup WP-CLI
uses: godaddy-wordpress/setup-wp-cli@1
- name: Install dependencies and build
run: |
npm i -g yarn
composer install
yarn install --immutable
yarn build
- name: Prepare tests
run: |
wp-env run cli wp theme activate go
wp-env run cli wp option update permalink_structure '/%postname%'
- name: Run tests
run: yarn test:e2e:customizer -- --record
- name: Upload failure video
if: ${{ failure() }}
uses: actions/upload-artifact@v3
with:
name: customizer.spec.js.mp4
path: ./.dev/tests/cypress/videos/**/*.mp4
retention-days: 1