Fix: password recovery when username is an email differing from stored email #81
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # WPUM E2E Tests | |
| # | |
| # Runs Playwright browser tests against a wp-env WordPress instance. | |
| # Builds vendor-dist (scoped dependencies) so the plugin loads correctly. | |
| # Tests run across multiple PHP versions via wp-env override. | |
| name: E2E Tests | |
| on: | |
| pull_request: | |
| push: | |
| branches: [master, develop] | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| e2e: | |
| name: Playwright E2E (PHP ${{ matrix.php }}) | |
| runs-on: ubuntu-latest | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| php: ['7.4', '8.1', '8.2', '8.3'] | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: "20" | |
| - name: Setup PHP | |
| uses: shivammathur/setup-php@v2 | |
| with: | |
| php-version: "8.2" | |
| coverage: none | |
| - name: Get Composer cache directory | |
| id: composer-cache | |
| run: echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT | |
| - name: Cache Composer dependencies | |
| uses: actions/cache@v4 | |
| with: | |
| path: ${{ steps.composer-cache.outputs.dir }} | |
| key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }} | |
| restore-keys: ${{ runner.os }}-composer- | |
| - name: Install Composer dependencies | |
| run: composer install --prefer-dist --no-progress --ignore-platform-reqs | |
| - name: Build scoped vendor (vendor-dist) | |
| run: | | |
| mkdir -p release/ci | |
| cp composer.json composer.lock scoper.inc.php release/ci/ | |
| php -r " | |
| \$j = json_decode(file_get_contents('release/ci/composer.json'), true); | |
| \$j['config']['autoloader-suffix'] = 'WPUMScoped'; | |
| file_put_contents('release/ci/composer.json', json_encode(\$j, JSON_PRETTY_PRINT | JSON_UNESCAPED_SLASHES)); | |
| " | |
| bash bin/prefix-dependencies.sh ci | |
| mv release/ci/vendor-dist ./vendor-dist | |
| rm -rf release/ci | |
| - name: Install npm dependencies | |
| run: npm ci --ignore-scripts --legacy-peer-deps | |
| - name: Install Playwright browsers | |
| run: npx playwright install --with-deps chromium | |
| - name: Ensure mu-plugins directory exists | |
| run: mkdir -p tests/mu-plugins | |
| - name: Set wp-env PHP version | |
| run: echo '{"phpVersion":"${{ matrix.php }}"}' > .wp-env.override.json | |
| - name: Start wp-env | |
| run: npx @wordpress/env start | |
| - name: Run E2E tests | |
| run: npx playwright test | |
| - name: Upload Playwright report | |
| uses: actions/upload-artifact@v4 | |
| if: failure() | |
| with: | |
| name: playwright-report-php${{ matrix.php }} | |
| path: playwright-report/ | |
| retention-days: 7 | |
| - name: Upload test results | |
| uses: actions/upload-artifact@v4 | |
| if: failure() | |
| with: | |
| name: test-results-php${{ matrix.php }} | |
| path: test-results/ | |
| retention-days: 7 |