fix better-sqlite3 error #3
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, master] | |
| pull_request: | |
| branches: [main, master] | |
| jobs: | |
| test: | |
| name: Test (Node ${{ matrix.node-version }}, ${{ matrix.os }}) | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| node-version: ['26'] | |
| os: [ubuntu-latest, windows-latest, macos-latest] | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Setup Node.js ${{ matrix.node-version }} | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: ${{ matrix.node-version }} | |
| - name: Cache node_modules | |
| id: cache-modules | |
| uses: actions/cache@v4 | |
| with: | |
| path: node_modules | |
| key: ${{ runner.os }}-node${{ matrix.node-version }}-${{ hashFiles('package-lock.json') }} | |
| - name: Install dependencies | |
| if: steps.cache-modules.outputs.cache-hit != 'true' | |
| run: npm ci | |
| - name: Rebuild native modules | |
| run: npm rebuild better-sqlite3 | |
| continue-on-error: true | |
| - name: Cache dist | |
| id: cache-dist | |
| uses: actions/cache@v4 | |
| with: | |
| path: dist | |
| key: ${{ runner.os }}-node${{ matrix.node-version }}-dist-${{ hashFiles('src/**', 'tsconfig.json', 'package-lock.json') }} | |
| - name: Build | |
| if: steps.cache-dist.outputs.cache-hit != 'true' | |
| run: npm run build | |
| - name: Run tests | |
| run: npm test |