Listener directive #466
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: CI Pipeline | |
| permissions: | |
| contents: read | |
| on: | |
| push: | |
| branches: | |
| - master | |
| pull_request: | |
| branches: | |
| - master | |
| jobs: | |
| setup: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-node@v4 | |
| with: | |
| node-version: lts/* | |
| - name: Cache node_modules and Playwright | |
| uses: actions/cache@v4 | |
| with: | |
| path: | | |
| node_modules | |
| ~/.cache/ms-playwright | |
| key: deps-${{ runner.os }}-${{ hashFiles('package-lock.json') }} | |
| restore-keys: | | |
| deps-${{ runner.os }}- | |
| - name: Install dependencies | |
| run: npm ci | |
| - name: Install Playwright browsers | |
| run: npx playwright install --with-deps | |
| lint: | |
| needs: setup | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-node@v4 | |
| with: | |
| node-version: lts/* | |
| - name: Restore node_modules cache | |
| uses: actions/cache@v4 | |
| with: | |
| path: | | |
| node_modules | |
| ~/.cache/ms-playwright | |
| key: deps-${{ runner.os }}-${{ hashFiles('package-lock.json') }} | |
| restore-keys: | | |
| deps-${{ runner.os }}- | |
| - name: Run lint check | |
| run: npx eslint ./src | |
| typescript: | |
| needs: lint | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-node@v4 | |
| with: | |
| node-version: lts/* | |
| - name: Restore node_modules cache | |
| uses: actions/cache@v4 | |
| with: | |
| path: | | |
| node_modules | |
| ~/.cache/ms-playwright | |
| key: deps-${{ runner.os }}-${{ hashFiles('package-lock.json') }} | |
| restore-keys: | | |
| deps-${{ runner.os }}- | |
| - name: Run TypeScript check | |
| run: npx tsc | |
| playwright: | |
| needs: typescript | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-node@v4 | |
| with: | |
| node-version: lts/* | |
| - name: Restore node_modules cache | |
| uses: actions/cache@v4 | |
| with: | |
| path: | | |
| node_modules | |
| ~/.cache/ms-playwright | |
| key: deps-${{ runner.os }}-${{ hashFiles('package-lock.json') }} | |
| restore-keys: | | |
| deps-${{ runner.os }}- | |
| - name: Run Playwright tests | |
| run: npx playwright test | |
| - uses: actions/upload-artifact@v4 | |
| if: always() | |
| with: | |
| name: playwright-report | |
| path: playwright-report/ | |
| retention-days: 3 |