mirror of
https://github.com/sharevb/it-tools.git
synced 2026-11-20 21:23:08 +03:00
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
53 lines
1.6 KiB
YAML
53 lines
1.6 KiB
YAML
name: E2E tests
|
|
on:
|
|
pull_request:
|
|
push:
|
|
branches:
|
|
- chore/all-my-stuffs
|
|
jobs:
|
|
test:
|
|
timeout-minutes: 30
|
|
runs-on: ubuntu-latest
|
|
strategy:
|
|
matrix:
|
|
shard: [1/3, 2/3, 3/3]
|
|
steps:
|
|
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
|
|
|
|
- run: |
|
|
echo "Before: corepack version => $(corepack --version || echo 'not installed')"
|
|
npm install -g corepack@latest
|
|
echo "After : corepack version => $(corepack --version)"
|
|
corepack enable
|
|
pnpm --version
|
|
|
|
- uses: actions/setup-node@v3
|
|
with:
|
|
node-version: 20
|
|
cache: 'pnpm'
|
|
|
|
- name: Get Playwright version
|
|
id: playwright-version
|
|
run: echo "PLAYWRIGHT_VERSION=$(jq -r .dependencies.playwright package.json)" >> "$GITHUB_OUTPUT"
|
|
|
|
- name: Install dependencies
|
|
run: pnpm install
|
|
|
|
- name: Build app
|
|
run: pnpm build
|
|
|
|
- name: Restore Playwright browsers from cache
|
|
uses: actions/cache@v4
|
|
with:
|
|
path: ~/.cache/ms-playwright
|
|
key: ${{ runner.os }}-playwright-${{ steps.playwright-version.outputs.PLAYWRIGHT_VERSION }}-${{ hashFiles('**/playwright.config.ts') }}
|
|
restore-keys: |
|
|
${{ runner.os }}-playwright-${{ steps.playwright-version.outputs.PLAYWRIGHT_VERSION }}-
|
|
${{ runner.os }}-playwright-
|
|
|
|
- name: Install Playwright Browsers
|
|
run: pnpm exec playwright install --with-deps
|
|
|
|
- name: Run Playwright tests
|
|
run: pnpm run test:e2e --shard=${{ matrix.shard }}
|