1.0.1 #248
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: Tests | |
| on: [push, pull_request] | |
| jobs: | |
| test: | |
| name: JavaScript Test Action | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v3 | |
| - name: Setup Bun | |
| uses: oven-sh/setup-bun@v1 | |
| - name: Install dependencies | |
| run: bun install | |
| - name: Get Playwright version | |
| id: playwright-version | |
| run: echo "version=$(bun pm ls | grep '@playwright/test' | awk '{print $2}')" >> $GITHUB_OUTPUT | |
| - name: Cache Playwright browsers | |
| uses: actions/cache@v3 | |
| id: playwright-cache | |
| with: | |
| path: ~/.cache/ms-playwright | |
| key: playwright-${{ runner.os }}-${{ steps.playwright-version.outputs.version }} | |
| - name: Install Playwright Browsers | |
| if: steps.playwright-cache.outputs.cache-hit != 'true' | |
| run: bunx playwright install --with-deps chromium firefox webkit | |
| - name: Install Playwright System Dependencies | |
| if: steps.playwright-cache.outputs.cache-hit == 'true' | |
| run: bunx playwright install-deps chromium firefox webkit | |
| - name: Build | |
| run: bun run build | |
| - name: Run Unit Tests | |
| run: bun run test | |
| - name: Run Browser Tests | |
| run: bun run test:browser | |
| - name: Generate Coverage Report | |
| run: bun run test --coverage |