From 7fa9778f31d9b3132021396a3b51f98ae6e8a6ad Mon Sep 17 00:00:00 2001 From: Siddharth Thevaril Date: Tue, 9 Jul 2024 17:55:54 +0530 Subject: [PATCH] try custom cypress action --- .github/workflows/cypress-actions.yml | 50 +++++++++++++++++++++++++++ 1 file changed, 50 insertions(+) create mode 100644 .github/workflows/cypress-actions.yml diff --git a/.github/workflows/cypress-actions.yml b/.github/workflows/cypress-actions.yml new file mode 100644 index 0000000..2d47210 --- /dev/null +++ b/.github/workflows/cypress-actions.yml @@ -0,0 +1,50 @@ +name: E2E Tests + +on: + push: + branches: + - cypress-actions + +jobs: + check-diffs: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v3 + with: + fetch-depth: 0 + + cypress: + runs-on: ubuntu-latest + strategy: + matrix: + core: + - {name: 'WP latest', version: 'latest'} + - {name: 'WP trunk', version: 'WordPress/WordPress#master'} + - {name: 'WP minimum', version: 'WordPress/WordPress#6.4'} + + steps: + - name: Checkout + uses: actions/checkout@v3 + + - name: Set PHP version + uses: shivammathur/setup-php@v2 + with: + php-version: '8.0' + coverage: none + tools: composer:v2 + + - name: Install PHP dependencies + run: composer i + + - name: Install dependencies + run: npm ci + + - name: Set the core version and plugins config + run: ./tests/bin/set-wp-config.js --core=${{ matrix.core.version }} --plugins=./${{ github.event.repository.name }},./tests/rsa-seeder + + - name: Set up WP environment + run: npm run env:start + + - name: Test + run: npm run cypress:run