feat: Copy control blocks #1
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: Test on PR branch | |
| on: pull_request | |
| jobs: | |
| unit: | |
| runs-on: ubuntu-20.04 | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v3 | |
| - name: Set up Node.js | |
| uses: actions/setup-node@v3 | |
| with: | |
| node-version: '20' | |
| - name: Install dependencies | |
| run: npm ci | |
| - name: Install playwright browsers | |
| run: npx playwright install chromium | |
| - name: Run unit tests | |
| run: npm run-script test:unit | |
| visual: | |
| runs-on: ubuntu-20.04 | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v3 | |
| - name: Set up Node.js | |
| uses: actions/setup-node@v3 | |
| with: | |
| node-version: '20' | |
| - name: Install dependencies | |
| run: npm ci | |
| - name: Install playwright browsers | |
| run: npx playwright install chromium | |
| - name: Run visual test | |
| run: npm run-script test:visual | |
| - name: Update screenshots | |
| if: failure() | |
| run: npm run test:update | |
| - name: Upload failed screenshots as artifacts | |
| uses: actions/upload-artifact@v4 | |
| if: failure() | |
| with: | |
| name: failed_screenshots | |
| path: | | |
| screenshots/*/failed/ | |
| screenshots/*/baseline/ |