|
| 1 | +name: CI |
| 2 | + |
| 3 | +on: |
| 4 | + push: |
| 5 | + branches: [main] |
| 6 | + pull_request: |
| 7 | + branches: [main] |
| 8 | + |
| 9 | +concurrency: |
| 10 | + group: ${{ github.workflow }}-${{ github.ref }} |
| 11 | + cancel-in-progress: true |
| 12 | + |
| 13 | +jobs: |
| 14 | + lint-and-typecheck: |
| 15 | + name: Lint & Typecheck |
| 16 | + runs-on: ubuntu-latest |
| 17 | + steps: |
| 18 | + - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 |
| 19 | + - uses: pnpm/action-setup@fe02b34f77f8bc703788d5817da081398fad5dd2 # v4.0.0 |
| 20 | + with: |
| 21 | + version: 9 |
| 22 | + - uses: actions/setup-node@39370e3970a6d050c480ffad4ff0ed4d3fdee5af # v4.1.0 |
| 23 | + with: |
| 24 | + node-version: 20 |
| 25 | + cache: "pnpm" |
| 26 | + - run: pnpm install --frozen-lockfile |
| 27 | + - run: pnpm lint |
| 28 | + - run: pnpm typecheck |
| 29 | + |
| 30 | + test: |
| 31 | + name: Test |
| 32 | + runs-on: ubuntu-latest |
| 33 | + steps: |
| 34 | + - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 |
| 35 | + - uses: pnpm/action-setup@fe02b34f77f8bc703788d5817da081398fad5dd2 # v4.0.0 |
| 36 | + with: |
| 37 | + version: 9 |
| 38 | + - uses: actions/setup-node@39370e3970a6d050c480ffad4ff0ed4d3fdee5af # v4.1.0 |
| 39 | + with: |
| 40 | + node-version: 20 |
| 41 | + cache: "pnpm" |
| 42 | + - run: pnpm install --frozen-lockfile |
| 43 | + - run: pnpm test |
| 44 | + |
| 45 | + build: |
| 46 | + name: Build |
| 47 | + runs-on: ubuntu-latest |
| 48 | + needs: [lint-and-typecheck, test] |
| 49 | + steps: |
| 50 | + - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 |
| 51 | + - uses: pnpm/action-setup@fe02b34f77f8bc703788d5817da081398fad5dd2 # v4.0.0 |
| 52 | + with: |
| 53 | + version: 9 |
| 54 | + - uses: actions/setup-node@39370e3970a6d050c480ffad4ff0ed4d3fdee5af # v4.1.0 |
| 55 | + with: |
| 56 | + node-version: 20 |
| 57 | + cache: "pnpm" |
| 58 | + - run: pnpm install --frozen-lockfile |
| 59 | + - run: pnpm build |
| 60 | + - uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # v4.4.3 |
| 61 | + with: |
| 62 | + name: extension-build |
| 63 | + path: extension/.output/chrome-mv3/ |
| 64 | + |
| 65 | + security: |
| 66 | + name: Security Scan |
| 67 | + runs-on: ubuntu-latest |
| 68 | + permissions: |
| 69 | + security-events: write |
| 70 | + steps: |
| 71 | + - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 |
| 72 | + - name: Run gitleaks |
| 73 | + uses: gitleaks/gitleaks-action@ff98106e4c7b2bc287bdc141ea3ee5f0bfb20271 # v2.3.7 |
| 74 | + env: |
| 75 | + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
| 76 | + |
| 77 | + codeql: |
| 78 | + name: CodeQL Analysis |
| 79 | + runs-on: ubuntu-latest |
| 80 | + permissions: |
| 81 | + security-events: write |
| 82 | + steps: |
| 83 | + - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 |
| 84 | + - name: Initialize CodeQL |
| 85 | + uses: github/codeql-action/init@48ab28a6f5dbc2a99bf1e0131198dd8f1df78169 # v3.28.0 |
| 86 | + with: |
| 87 | + languages: javascript-typescript |
| 88 | + - name: Autobuild |
| 89 | + uses: github/codeql-action/autobuild@48ab28a6f5dbc2a99bf1e0131198dd8f1df78169 # v3.28.0 |
| 90 | + - name: Perform CodeQL Analysis |
| 91 | + uses: github/codeql-action/analyze@48ab28a6f5dbc2a99bf1e0131198dd8f1df78169 # v3.28.0 |
0 commit comments