feat(dev): replace docker with wp-env #19
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
| name: "Copilot Setup Steps" | |
| on: | |
| workflow_dispatch: | |
| push: | |
| paths: | |
| - .github/workflows/copilot-setup-steps.yml | |
| pull_request: | |
| paths: | |
| - .github/workflows/copilot-setup-steps.yml | |
| jobs: | |
| copilot-setup-steps: | |
| runs-on: ubuntu-latest | |
| services: | |
| mysql: | |
| image: mysql:5.7 | |
| env: | |
| MYSQL_ROOT_PASSWORD: root | |
| ports: | |
| - 3306:3306 | |
| options: --health-cmd="mysqladmin ping" --health-interval=10s --health-timeout=5s --health-retries=3 | |
| permissions: | |
| contents: read | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v5 | |
| - name: Set up Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: "18" | |
| cache: "npm" | |
| - name: Install JavaScript dependencies | |
| run: npm ci | |
| - name: Install Playwright CLI | |
| run: npm install -g playwright-cli | |
| - name: Install Playwright browsers | |
| run: npx playwright install --with-deps chromium | |
| - name: Set up PHP | |
| uses: shivammathur/setup-php@v2 | |
| with: | |
| php-version: "7.4" | |
| extensions: simplexml, mysql | |
| tools: phpunit-polyfills | |
| - name: Install PHP dependencies | |
| run: composer install --prefer-dist --no-progress | |
| - name: Bootstrap E2E environment (wp-env) | |
| run: npx wp-env start | |
| - name: Install WordPress test suite | |
| run: bash bin/install-wp-tests.sh wordpress_test root root 127.0.0.1:3306 |