ci: build from source in publish job so npm provenance works #14
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] | |
| jobs: | |
| test: | |
| name: ${{ matrix.os }} · node${{ matrix.node-version }} | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| os: [ubuntu-latest, macos-latest] | |
| node-version: [18, 20, 22] | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Set up Node | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: ${{ matrix.node-version }} | |
| cache: npm | |
| - name: Install | |
| run: npm ci | |
| - name: Lint (eslint) | |
| run: npm run lint | |
| - name: Format check (prettier) | |
| run: npm run format:check | |
| - name: Type-check (tsc) | |
| run: npm run typecheck | |
| - name: Build | |
| run: npm run build | |
| - name: Unit tests | |
| run: npm test -- tests/unit |