chore(release): 1.7.0 (#92, #93, #94, #95, #80) #166
Workflow file for this run
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 | |
| on: | |
| push: | |
| branches: [main] | |
| pull_request: | |
| branches: [main] | |
| permissions: | |
| contents: read | |
| jobs: | |
| build-and-test: | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: | |
| node-version: [20, 22] | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - name: Setup pnpm | |
| uses: pnpm/action-setup@v5 | |
| - name: Setup Node.js ${{ matrix.node-version }} | |
| uses: actions/setup-node@v6 | |
| with: | |
| node-version: ${{ matrix.node-version }} | |
| cache: pnpm | |
| - name: Install dependencies | |
| run: pnpm install --frozen-lockfile | |
| # Static checks run individually so the test suite runs only once — via | |
| # test:coverage below — instead of twice (pnpm run check already includes | |
| # the tests). | |
| - name: Typecheck | |
| run: pnpm run typecheck | |
| - name: Lint | |
| run: pnpm run lint | |
| - name: Format check | |
| run: pnpm run format:check | |
| - name: Test with coverage | |
| run: pnpm run test:coverage | |
| - name: Build | |
| run: pnpm run build | |
| # The widget HTML is generated, never committed. Assert it survived both | |
| # the vite bundle and the tsc compile, so a broken pipeline fails here | |
| # instead of shipping a server whose widget resource is empty. | |
| - name: Verify widget template is bundled | |
| run: | | |
| test -s src/generated/trefferliste-html.ts | |
| node --input-type=module -e ' | |
| const { TREFFERLISTE_HTML } = await import("./dist/generated/trefferliste-html.js"); | |
| const fail = (why) => { console.error("widget template " + why); process.exit(1); }; | |
| if (TREFFERLISTE_HTML.length < 500) fail("too small: " + TREFFERLISTE_HTML.length + " chars"); | |
| if (/<script[^>]+\bsrc\s*=/i.test(TREFFERLISTE_HTML)) fail("has a non-inlined script"); | |
| if (/<link[^>]+rel\s*=\s*["\x27]?stylesheet/i.test(TREFFERLISTE_HTML)) fail("has a non-inlined stylesheet"); | |
| if (/<link[^>]+rel\s*=\s*["\x27]?modulepreload/i.test(TREFFERLISTE_HTML)) fail("has a modulepreload link"); | |
| console.log("widget template ok: " + TREFFERLISTE_HTML.length + " chars, fully inlined"); | |
| ' | |
| - name: Upload coverage artifacts | |
| if: matrix.node-version == 22 | |
| uses: actions/upload-artifact@v7 | |
| with: | |
| name: coverage-report | |
| path: coverage/ | |
| retention-days: 14 |