Repository navigation
fix(adapter-pg): map commit-time write conflicts to P2034 #36237
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 | |
| # Run on `push` only for main, if not it will trigger `push` & `pull_request` on PRs at the same time | |
| on: | |
| push: | |
| branches: | |
| - v7 | |
| - '*.*.x' | |
| paths-ignore: | |
| # Any update here needs to be done for `pull_request` (see below) and all files | |
| # (test.yml, benchmark.yml, publish.yml, bundle-size.yml, ci-aux-files.yml) | |
| - '*.md' | |
| - '*.bench.ts' | |
| - 'LICENSE' | |
| - '.dockerignore' | |
| - 'scripts/ci/publish.ts' | |
| - '.github/CODEOWNERS' | |
| - '.github/ISSUE_TEMPLATE/**' | |
| - '.github/DISCUSSION_TEMPLATE/**' | |
| - '.devcontainer/**' | |
| - '.vscode/**' | |
| - 'graphs/**' | |
| - 'sandbox/**' | |
| pull_request: | |
| paths-ignore: | |
| # Any update here needs to be done for `branches` (see above) and all files | |
| # (test.yml, benchmark.yml, publish.yml, bundle-size.yml, ci-aux-files.yml) | |
| - '*.md' | |
| - '*.bench.ts' | |
| - 'LICENSE' | |
| - '.dockerignore' | |
| - 'scripts/ci/publish.ts' | |
| - '.github/CODEOWNERS' | |
| - '.github/ISSUE_TEMPLATE/**' | |
| - '.github/DISCUSSION_TEMPLATE/**' | |
| - '.devcontainer/**' | |
| - '.vscode/**' | |
| - 'graphs/**' | |
| - 'sandbox/**' | |
| workflow_dispatch: | |
| jobs: | |
| detect_jobs_to_run: | |
| name: Detect jobs to run | |
| runs-on: ubuntu-latest | |
| outputs: | |
| jobs: ${{ steps.detect.outputs.jobs }} | |
| steps: | |
| - uses: actions/checkout@d23441a48e516b6c34aea4fa41551a30e30af803 # v6.1.0 | |
| - id: files | |
| # This fork of jitterbit/get-changed-files@v1 works better with pull requests. | |
| uses: Ana06/get-changed-files@25f79e676e7ea1868813e21465014798211fad8c # v2.3.0 | |
| with: | |
| format: 'json' | |
| - id: detect | |
| run: ./.github/workflows/scripts/detect-jobs-to-run.js <<< '${{ steps.files.outputs.all }}' | |
| - name: Debug Pull Request Event | |
| if: ${{ github.event_name == 'pull_request' }} | |
| env: | |
| PR_BODY: ${{ github.event.pull_request.body }} | |
| run: | | |
| echo "Pull Request: ${{ github.event.pull_request.number }}" | |
| echo "Pull Request Author: ${{ github.event.pull_request.user.login }}" | |
| echo "Pull Request Author Association: ${{ github.event.pull_request.author_association }}" | |
| echo "Pull Request Body contains /integration: ${{ contains(env.PR_BODY, '/integration') }}" | |
| - name: Find "ci test all" comment | |
| uses: peter-evans/find-comment@b30e6a3c0ed37e7c023ccd3f1db5c6c0b0c23aad # v4.0.0 | |
| id: findTestAllComment | |
| if: ${{ github.event_name == 'pull_request' }} | |
| with: | |
| issue-number: ${{ github.event.pull_request.number }} | |
| body-includes: 'ci test all' | |
| - name: Trigger npm release workflow for integration release | |
| env: | |
| PR_BODY: ${{ github.event.pull_request.body }} | |
| # See https://docs.github.com/en/graphql/reference/enums | |
| # https://michaelheap.com/github-actions-check-permission/ | |
| # Check if | |
| # - the PR body contains `/integration` | |
| # - the PR author has permissions to trigger the workflow (must be part of the org or a collaborator) | |
| if: | | |
| github.event_name == 'pull_request' && | |
| contains(env.PR_BODY, '/integration') && | |
| ( | |
| github.event.pull_request.author_association == 'OWNER' || | |
| github.event.pull_request.author_association == 'MEMBER' || | |
| github.event.pull_request.author_association == 'COLLABORATOR' || | |
| github.event.pull_request.author_association == 'CONTRIBUTOR' | |
| ) | |
| uses: benc-uk/workflow-dispatch@31e2b3319479a63f0ab15bf800eff9e913504e26 # v1.3.2 | |
| with: | |
| workflow: publish.yml | |
| token: ${{ secrets.BOT_TOKEN }} | |
| inputs: '{ "forceIntegrationRelease": "true" }' | |
| ref: ${{ github.event.pull_request.head.ref }} | |
| build_custom_engine: | |
| name: Build custom engine | |
| needs: detect_jobs_to_run | |
| uses: ./.github/workflows/build-engine-branch.yml | |
| check_custom_engine: | |
| name: Block merge if custom engine is used | |
| needs: build_custom_engine | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Find past custom engine comment | |
| uses: peter-evans/find-comment@b30e6a3c0ed37e7c023ccd3f1db5c6c0b0c23aad # v4.0.0 | |
| id: findEngineComment | |
| if: ${{ github.event_name == 'pull_request' }} | |
| with: | |
| issue-number: ${{ github.event.pull_request.number }} | |
| body-includes: '<!-- custom-engine -->' | |
| - name: Create or update comment (block) | |
| uses: peter-evans/create-or-update-comment@e8674b075228eee787fea43ef493e45ece1004c9 # v5.0.0 | |
| if: ${{ needs.build_custom_engine.outputs.engineHash != '' }} | |
| with: | |
| comment-id: ${{ steps.findEngineComment.outputs.comment-id }} | |
| issue-number: ${{ github.event.pull_request.number }} | |
| body: | | |
| <!-- custom-engine --> | |
| 🔴 **CUSTOM ENGINE IS USED** | |
| This PR is using custom engine: | |
| Branch: [`${{ needs.build_custom_engine.outputs.branchName }}`](https://github.com/prisma/prisma-engines/tree/${{ needs.build_custom_engine.outputs.branchName }}) | |
| Commit: [`${{ needs.build_custom_engine.outputs.engineHash }}`](https://github.com/prisma/prisma-engines/commit/${{ needs.build_custom_engine.outputs.engineHash }}). | |
| Don't forget to remove `/engine-branch` command from PR body and re-run the tests with default engine before merging. | |
| edit-mode: replace | |
| - name: Create or update comment (clear) | |
| uses: peter-evans/create-or-update-comment@e8674b075228eee787fea43ef493e45ece1004c9 # v5.0.0 | |
| if: ${{ steps.findEngineComment.outputs.comment-id != '' && needs.build_custom_engine.outputs.engineHash == '' }} | |
| with: | |
| comment-id: ${{ steps.findEngineComment.outputs.comment-id }} | |
| issue-number: ${{ github.event.pull_request.number }} | |
| body: | | |
| <!-- custom-engine --> | |
| 🟢 All good, this PR is no longer uses custom engine. | |
| edit-mode: replace | |
| - name: Block merge | |
| if: ${{ needs.build_custom_engine.outputs.engineHash != '' }} | |
| run: | | |
| echo "Custom engine is used, failing the job" | |
| echo "Don't forget to remove /engine-branch command from PR body before merge" | |
| exit 1 | |
| run_tests: | |
| name: 🧪 | |
| needs: | |
| - detect_jobs_to_run | |
| - build_custom_engine | |
| uses: ./.github/workflows/test-template.yml | |
| with: | |
| jobsToRun: ${{ needs.detect_jobs_to_run.outputs.jobs }} | |
| engineHash: ${{ needs.build_custom_engine.outputs.engineHash }} | |
| secrets: inherit |