Skip to content

Feat: Upgrade to tailwind 4 #1932

Feat: Upgrade to tailwind 4

Feat: Upgrade to tailwind 4 #1932

Workflow file for this run

name: E2E Tests
on:
pull_request:
branches: [main, next]
jobs:
run-tests:
timeout-minutes: 60
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macOS-latest, windows-latest]
node-version: [18.13.0, 20, 22]
isMain:
- ${{ github.base_ref == 'main' }}
exclude:
- isMain: false
node-version: 20
name: e2e/${{ matrix.os }}/node-${{ matrix.node-version}}
runs-on: ${{ matrix.os }}
steps:
- name: Checkout Repo
uses: actions/checkout@v4
- name: Check if only docs changed
id: docs-check
shell: bash
run: |
# Fetch the base branch
git fetch origin ${{ github.event.pull_request.base.ref }}
# Get list of changed files
CHANGED_FILES=$(git diff --name-only origin/${{ github.event.pull_request.base.ref }})
# Check if any changed files are outside sites/docs/
NON_DOCS_CHANGES=$(echo "$CHANGED_FILES" | grep -vE '^sites/docs/' || true)
if [ -z "$NON_DOCS_CHANGES" ]; then
echo "only_docs=true" >> "$GITHUB_OUTPUT"
echo "Skipping e2e tests because only docs were changed."
else
echo "only_docs=false" >> "$GITHUB_OUTPUT"
fi
- name: Set OS environment variable
if: steps.docs-check.outputs.only_docs != 'true'
run: echo "__E2E_WORKFLOW_OS__=${{ matrix.os }}" >> $GITHUB_ENV
- name: Action Setup (pnpm)
if: steps.docs-check.outputs.only_docs != 'true'
uses: pnpm/action-setup@v4
- name: Setup Node
if: steps.docs-check.outputs.only_docs != 'true'
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
cache: pnpm
- name: Install dependencies
if: steps.docs-check.outputs.only_docs != 'true'
run: pnpm install --frozen-lockfile
- name: Install Playwright and browsers
if: steps.docs-check.outputs.only_docs != 'true'
run: pnpm playwright install --with-deps
- name: Run setup
if: steps.docs-check.outputs.only_docs != 'true'
run: pnpm --filter "./e2e/*" run --if-present setup
- name: Run sources
if: steps.docs-check.outputs.only_docs != 'true'
run: pnpm --filter "./e2e/*" run sources
- name: Run dev mode tests
if: steps.docs-check.outputs.only_docs != 'true'
run: pnpm --filter "./e2e/*" --sequential run test:dev
- name: Build
if: steps.docs-check.outputs.only_docs != 'true'
run: pnpm --filter "./e2e/*" run build
- name: Run preview mode tests
if: steps.docs-check.outputs.only_docs != 'true'
run: pnpm --filter "./e2e/*" --sequential run test:preview
- name: Upload Playwright reports
if: always() && steps.docs-check.outputs.only_docs != 'true'
uses: actions/upload-artifact@v4
with:
name: playwright-report__e2e_${{ matrix.os }}_node-${{ matrix.node-version }}
path: e2e/**/playwright-report