fix: update CI workflow to include Prisma binaries and engines mirrors #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, develop] | |
| pull_request: | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| env: | |
| NPM_TOKEN: ${{ secrets.GH_TOKEN }} | |
| PRISMA_ENGINES_CHECKSUM_IGNORE_MISSING: 1 | |
| PRISMA_SKIP_POSTINSTALL_GENERATE: true | |
| PRISMA_BINARIES_MIRROR: https://prisma-builds.s3-eu-west-1.amazonaws.com | |
| PRISMA_ENGINES_MIRROR: https://prisma-builds.s3-eu-west-1.amazonaws.com | |
| strategy: | |
| matrix: | |
| node-version: [20.x] | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Ensure npm token available | |
| run: | | |
| if [ -z "$NPM_TOKEN" ]; then | |
| echo "GH_TOKEN secret is required to install from GitHub Packages" && exit 1 | |
| fi | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: ${{ matrix.node-version }} | |
| cache: npm | |
| - name: Install dependencies | |
| run: npm ci | |
| - name: Generate Prisma Client | |
| run: npx prisma generate | |
| continue-on-error: false | |
| - name: Lint | |
| run: npm run lint | |
| - name: Type check | |
| run: npm run typecheck | |
| - name: Test | |
| run: npm test | |
| - name: Build | |
| run: npm run build |