chore: release main #1342
This file contains 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 tests | |
on: | |
# Build on pushes branches that have a PR (including drafts) | |
pull_request: | |
# Build on commits pushed to branches without a PR if it's in the allowlist | |
push: | |
branches: [main] | |
jobs: | |
test: | |
timeout-minutes: 60 | |
name: E2E tests (${{ matrix.browser }}) | |
runs-on: ${{ matrix.os }} | |
continue-on-error: ${{ matrix.experimental }} | |
strategy: | |
# we want to know if a test fails on a specific node version | |
fail-fast: false | |
matrix: | |
os: [ubuntu-latest] | |
browser: [ | |
chromium, | |
# firefox, | |
# webkit | |
] | |
node: [20] | |
experimental: [false] | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Setup node | |
uses: actions/setup-node@v4 | |
with: | |
node-version: ${{ matrix.node }} | |
- uses: pnpm/action-setup@v4 | |
name: Install pnpm | |
id: pnpm-install | |
with: | |
run_install: false | |
- name: Get pnpm store directory | |
id: pnpm-cache | |
shell: bash | |
run: | | |
echo "STORE_PATH=$(pnpm store path)" >> $GITHUB_OUTPUT | |
- name: Cache node modules | |
id: cache-node-modules | |
uses: actions/cache@v4 | |
env: | |
cache-name: cache-node-modules | |
with: | |
path: ${{ steps.pnpm-cache.outputs.STORE_PATH }} | |
key: ${{ runner.os }}-pnpm-store-${{ env.cache-name }}-${{ hashFiles('**/pnpm-lock.yaml') }} | |
restore-keys: | | |
v1-${{ runner.os }}-pnpm-store-${{ env.cache-name }}- | |
v1-${{ runner.os }}-pnpm-store- | |
v1-${{ runner.os }}- | |
- name: Install project dependencies | |
run: pnpm install | |
- name: Store Playwright's Version | |
run: | | |
PLAYWRIGHT_VERSION=$(npx playwright --version | sed 's/Version //') | |
echo "Playwright's Version: $PLAYWRIGHT_VERSION" | |
echo "PLAYWRIGHT_VERSION=$PLAYWRIGHT_VERSION" >> $GITHUB_ENV | |
- name: Cache Playwright Browsers for Playwright's Version | |
id: cache-playwright-browsers | |
uses: actions/cache/restore@v4 | |
with: | |
path: ~/.cache/ms-playwright | |
key: playwright-browsers-${{ env.PLAYWRIGHT_VERSION }} | |
- name: Install Playwright Browsers | |
if: steps.cache-playwright-browsers.outputs.cache-hit != 'true' | |
run: npx playwright install --with-deps | |
- name: Test | |
id: test | |
run: | | |
node -v | |
pnpm -v | |
pnpm test -- -- --project ${{ matrix.browser }} |