Merge branch 'main' of https://github.com/multipliedtwice/prisma-guar… #41
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: | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: | |
| node-version: [20, 22] | |
| prisma-version: ['6.8.0', '7.4.0'] | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-node@v4 | |
| with: | |
| node-version: ${{ matrix.node-version }} | |
| cache: npm | |
| - run: npm ci | |
| - name: Override Prisma version | |
| if: matrix.prisma-version != '7.4.0' | |
| run: | | |
| npm install --save-dev prisma@${{ matrix.prisma-version }} @prisma/client@${{ matrix.prisma-version }} | |
| npm install @prisma/generator-helper@${{ matrix.prisma-version }} | |
| - run: npm run typecheck | |
| - run: npm run build | |
| - run: npx vitest run --coverage | |
| - name: Upload coverage to Codecov | |
| if: matrix.node-version == 22 && matrix.prisma-version == '7.4.0' | |
| uses: codecov/codecov-action@v5 | |
| with: | |
| token: ${{ secrets.CODECOV_TOKEN }} | |
| - run: npm run test:e2e | |
| release: | |
| needs: [test] | |
| if: github.ref == 'refs/heads/main' && github.event_name == 'push' | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: write | |
| issues: write | |
| pull-requests: write | |
| id-token: write | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| - uses: actions/setup-node@v4 | |
| with: | |
| node-version: 22 | |
| cache: npm | |
| registry-url: https://registry.npmjs.org | |
| - run: npm ci | |
| - run: npm run build | |
| - name: Release | |
| run: npx semantic-release | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} | |
| NPM_TOKEN: ${{ secrets.NPM_TOKEN }} |