Move vue project setup to guide #1553
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: Playwright Tests | |
on: | |
push: | |
branches: ["main"] | |
pull_request: | |
types: [opened, synchronize, reopened] | |
jobs: | |
test: | |
timeout-minutes: 60 | |
runs-on: ubuntu-latest | |
continue-on-error: true | |
strategy: | |
matrix: | |
project: ["tests/e2e", "examples/chat", "examples/music-player", "examples/pets", "examples/onboarding"] | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
submodules: true | |
- name: Enable corepack | |
run: corepack enable | |
- name: Install Node.js | |
uses: actions/setup-node@v3 | |
with: | |
node-version-file: '.node-version' | |
cache: 'pnpm' | |
- name: Get pnpm store directory | |
shell: bash | |
run: | | |
echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV | |
- uses: actions/cache@v3 | |
name: Setup pnpm cache | |
with: | |
path: ${{ env.STORE_PATH }} | |
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }} | |
restore-keys: | | |
${{ runner.os }}-pnpm-store- | |
- name: Install dependencies | |
run: pnpm install --frozen-lockfile | |
- name: Pnpm Build | |
run: pnpm turbo build | |
working-directory: ./${{ matrix.project }} | |
- name: Build jazz-run | |
run: pnpm exec turbo build && chmod +x dist/index.js; | |
working-directory: ./packages/jazz-run | |
- name: Install Playwright Browsers | |
run: pnpm exec playwright install --with-deps | |
working-directory: ./${{ matrix.project }} | |
- name: Run Playwright tests | |
run: pnpm exec playwright test | |
working-directory: ./${{ matrix.project }} | |
- uses: actions/upload-artifact@v4 | |
if: failure() | |
with: | |
name: ${{ hashFiles(format('{0}/package.json', matrix.project)) }}-playwright-report | |
path: ./${{ matrix.project }}/playwright-report/ | |
retention-days: 30 |