SITE-5791: pin actions to Node 24 release SHAs #29
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
| name: E2E | |
| on: | |
| workflow_dispatch: | |
| push: | |
| paths: | |
| - 'tests/e2e/**' | |
| - '.github/workflows/e2e.yml' | |
| permissions: | |
| contents: read | |
| jobs: | |
| e2e: | |
| name: Playwright E2E (Pantheon multidev) | |
| runs-on: ubuntu-latest | |
| defaults: | |
| run: | |
| working-directory: tests/e2e | |
| env: | |
| TERMINUS_SITE: ${{ vars.E2E_TERMINUS_SITE }} | |
| TERMINUS_SOURCE_ENV: ${{ vars.E2E_TERMINUS_SOURCE_ENV || 'dev' }} | |
| TERMINUS_HIDE_UPDATE_MESSAGE: '1' | |
| WP_USER: ${{ secrets.E2E_WP_USER }} | |
| WP_PASSWORD: ${{ secrets.E2E_WP_PASSWORD }} | |
| HEADLESS: 'true' | |
| steps: | |
| - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 | |
| - name: Set up PHP (for Terminus) | |
| uses: shivammathur/setup-php@f3e473d116dcccaddc5834248c87452386958240 # v2 | |
| with: | |
| php-version: '8.3' | |
| - name: Set up Node | |
| uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0 | |
| with: | |
| node-version: 20 | |
| - name: Install Terminus | |
| run: | | |
| curl -L https://github.com/pantheon-systems/terminus/releases/latest/download/terminus.phar -o /tmp/terminus | |
| chmod +x /tmp/terminus | |
| sudo mv /tmp/terminus /usr/local/bin/terminus | |
| terminus --version | |
| - name: Authenticate Terminus | |
| env: | |
| TERMINUS_TOKEN: ${{ secrets.TERMINUS_TOKEN }} | |
| run: terminus auth:login --machine-token="$TERMINUS_TOKEN" | |
| - name: Configure SSH for Pantheon (git/SFTP) | |
| env: | |
| PANTHEON_SSH_KEY: ${{ secrets.PANTHEON_SSH_KEY }} | |
| run: | | |
| mkdir -p ~/.ssh | |
| printf '%s\n' "$PANTHEON_SSH_KEY" > ~/.ssh/id_rsa | |
| chmod 600 ~/.ssh/id_rsa | |
| - name: Install dependencies | |
| run: npm ci | |
| - name: Install Playwright browser | |
| run: npx playwright install --with-deps chromium | |
| - name: Run E2E | |
| run: npm test | |
| - name: Upload Playwright report | |
| if: always() | |
| uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 | |
| with: | |
| name: playwright-report | |
| path: tests/e2e/playwright-report/ | |
| retention-days: 7 | |
| - name: Upload test results (screenshots, videos, traces) | |
| if: always() | |
| uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 | |
| with: | |
| name: test-results | |
| path: tests/e2e/test-results/ | |
| retention-days: 7 |