Skip to content

Production release: 3.10.10 #3500

Production release: 3.10.10

Production release: 3.10.10 #3500

Workflow file for this run

name: Cypress Tests
on:
pull_request:
branches:
- main
paths:
- "**"
- "!.devcontainer/**"
- "!.github/**"
- "!infrastructure/.devcontainer/**"
- "!infrastructure/terragrunt/**"
env:
WPML_USER_ID: ${{ secrets.WPML_USER_ID }}
WPML_KEY: ${{ secrets.WPML_KEY }}
jobs:
test:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3
- uses: actions/setup-node@e33196f7422957bea03ed53f6fbb155025ffc7b8 # v3.7.0
with:
node-version: 16
- name: PHP Setup
uses: shivammathur/setup-php@v2
with:
php-version: 8.1
- name: Add Composer auth credentials
run: |
cd wordpress
composer config github-oauth.github.com ${{ secrets.COMPOSER_GITHUB_TOKEN }}
composer config http-basic.my.yoast.com token ${{ secrets.COMPOSER_YOAST_TOKEN }}
- name: Get Composer Cache Directory
id: composer-cache
run: |
echo "::set-output name=dir::$(composer config cache-files-dir)"
- name: Cache Composer
uses: actions/cache@88522ab9f39a2ea568f7027eddc7d8d8bc9d59c8 # v3.3.1
with:
path: ${{ steps.composer-cache.outputs.dir }}
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
restore-keys: |
${{ runner.os }}-composer-
- name: Composer install
working-directory: wordpress
run: |
composer install --prefer-dist --no-progress
composer check-platform-reqs
- name: Cache NPM
uses: actions/cache@88522ab9f39a2ea568f7027eddc7d8d8bc9d59c8 # v3.3.1
with:
path: |
~/.npm
~/.cache/Cypress
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-node-
- name: Cypress and NPM install and build
uses: cypress-io/github-action@d79d2d530a66e641eb4a5f227e13bc985c60b964 # v4.2.2
with:
runTests: false
- name: Start test environment
run: |
npm run wp-env:init
npm run wp-env:test:setup
- name: Cypress run
uses: cypress-io/github-action@d79d2d530a66e641eb4a5f227e13bc985c60b964 # v4.2.2
with:
install: false
env:
# pass the Dashboard record key as an environment variable
CYPRESS_RECORD_KEY: ${{ secrets.CYPRESS_RECORD_KEY }}
# pass GitHub token to allow accurately detecting a build vs a re-run build
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- uses: actions/upload-artifact@0b7f8abb1508181956e8e162db84b466c27e18ce # v3.1.2
if: failure()
with:
name: cypress-screenshots
path: cypress/screenshots
- uses: actions/upload-artifact@0b7f8abb1508181956e8e162db84b466c27e18ce # v3.1.2
if: always()
with:
name: cypress-videos
path: cypress/videos