|
| 1 | +name: Tests |
| 2 | + |
| 3 | +on: |
| 4 | + pull_request: |
| 5 | + branches: ["*"] |
| 6 | + push: |
| 7 | + branches: ["main", "changesets/release"] |
| 8 | + merge_group: |
| 9 | + workflow_dispatch: |
| 10 | + inputs: |
| 11 | + pr_number: |
| 12 | + description: "PR number to run CI for" |
| 13 | + required: false |
| 14 | + type: string |
| 15 | + |
| 16 | +concurrency: |
| 17 | + group: ${{ github.workflow }}-${{ github.ref }} |
| 18 | + cancel-in-progress: ${{ github.ref != 'refs/heads/main' }} |
| 19 | + |
| 20 | +permissions: |
| 21 | + contents: read |
| 22 | + pull-requests: read |
| 23 | + checks: write |
| 24 | + statuses: write |
| 25 | + |
| 26 | +# You can leverage Vercel Remote Caching with Turbo to speed up your builds |
| 27 | +# @link https://turborepo.org/docs/core-concepts/remote-caching#remote-caching-on-vercel-builds |
| 28 | +env: |
| 29 | + FORCE_COLOR: 3 |
| 30 | + |
| 31 | +jobs: |
| 32 | + node_versions: |
| 33 | + runs-on: ubuntu-latest |
| 34 | + strategy: |
| 35 | + matrix: |
| 36 | + node-version: [20, 22] |
| 37 | + name: Test (Node.js ${{ matrix.node-version }}) |
| 38 | + steps: |
| 39 | + - uses: actions/checkout@v4 |
| 40 | + |
| 41 | + - name: Setup Node.js ${{ matrix.node-version }} |
| 42 | + uses: actions/setup-node@v4 |
| 43 | + with: |
| 44 | + node-version: ${{ matrix.node-version }} |
| 45 | + |
| 46 | + - name: Setup pnpm |
| 47 | + uses: pnpm/action-setup@v4 |
| 48 | + with: |
| 49 | + version: 10.15.1 |
| 50 | + run_install: false |
| 51 | + |
| 52 | + - shell: bash |
| 53 | + run: pnpm install |
| 54 | + |
| 55 | + - name: Build packages |
| 56 | + run: | |
| 57 | + pnpm -F adapter-prisma prisma:generate |
| 58 | + pnpm --filter "./packages/*" build |
| 59 | +
|
| 60 | + - name: Test Core Package |
| 61 | + run: pnpm test:core |
| 62 | + |
| 63 | + - name: Test Drizzle |
| 64 | + run: pnpm test:drizzle |
| 65 | + env: |
| 66 | + # Ensure Docker is available for Testcontainers |
| 67 | + TESTCONTAINERS_RYUK_DISABLED: true |
| 68 | + |
| 69 | + - name: Test Prisma |
| 70 | + run: | |
| 71 | + pnpm -F adapter-prisma prisma:generate |
| 72 | + pnpm test:prisma |
| 73 | + env: |
| 74 | + # Ensure Docker is available for Testcontainers |
| 75 | + TESTCONTAINERS_RYUK_DISABLED: true |
| 76 | + |
| 77 | + - name: Test Kysely |
| 78 | + run: pnpm test:kysely |
| 79 | + env: |
| 80 | + # Ensure Docker is available for Testcontainers |
| 81 | + TESTCONTAINERS_RYUK_DISABLED: true |
| 82 | + |
| 83 | + postgres-drizzle: |
| 84 | + runs-on: ubuntu-latest |
| 85 | + strategy: |
| 86 | + matrix: |
| 87 | + pg-version: [12, 13, 14, 15, 16, 17] |
| 88 | + name: Test Drizzle Adapter (Postgres ${{ matrix.pg-version }}) |
| 89 | + steps: |
| 90 | + - uses: actions/checkout@v4 |
| 91 | + |
| 92 | + - name: Setup |
| 93 | + uses: ./.github/setup |
| 94 | + |
| 95 | + - name: Setup pnpm |
| 96 | + uses: pnpm/action-setup@v4 |
| 97 | + with: |
| 98 | + version: 10.15.1 |
| 99 | + run_install: false |
| 100 | + |
| 101 | + - shell: bash |
| 102 | + run: pnpm install |
| 103 | + |
| 104 | + - name: Build package |
| 105 | + run: | |
| 106 | + pnpm --filter "./packages/*" build |
| 107 | +
|
| 108 | + - name: Test PostgreSQL (Postgres ${{ matrix.pg-version }}) |
| 109 | + run: pnpm test:drizzle |
| 110 | + env: |
| 111 | + # Ensure Docker is available for Testcontainers |
| 112 | + TESTCONTAINERS_RYUK_DISABLED: true |
| 113 | + PG_VERSION: ${{ matrix.pg-version }} |
| 114 | + |
| 115 | + postgres-prisma: |
| 116 | + runs-on: ubuntu-latest |
| 117 | + strategy: |
| 118 | + matrix: |
| 119 | + pg-version: [12, 13, 14, 15, 16, 17] |
| 120 | + name: Test Prisma Adapter (Postgres ${{ matrix.pg-version }}) |
| 121 | + steps: |
| 122 | + - uses: actions/checkout@v4 |
| 123 | + |
| 124 | + - name: Setup |
| 125 | + uses: ./.github/setup |
| 126 | + |
| 127 | + - name: Setup pnpm |
| 128 | + uses: pnpm/action-setup@v4 |
| 129 | + with: |
| 130 | + version: 10.15.1 |
| 131 | + run_install: false |
| 132 | + |
| 133 | + - shell: bash |
| 134 | + run: pnpm install |
| 135 | + |
| 136 | + - name: Build package |
| 137 | + run: | |
| 138 | + pnpm --filter "./packages/*" build |
| 139 | +
|
| 140 | + - name: Test PostgreSQL (Postgres ${{ matrix.pg-version }}) |
| 141 | + run: | |
| 142 | + pnpm -F adapter-prisma prisma:generate |
| 143 | + pnpm test:prisma |
| 144 | + env: |
| 145 | + # Ensure Docker is available for Testcontainers |
| 146 | + TESTCONTAINERS_RYUK_DISABLED: true |
| 147 | + PG_VERSION: ${{ matrix.pg-version }} |
| 148 | + |
| 149 | + postgres-kysely: |
| 150 | + runs-on: ubuntu-latest |
| 151 | + strategy: |
| 152 | + matrix: |
| 153 | + pg-version: [12, 13, 14, 15, 16, 17] |
| 154 | + name: Test Kysely Adapter (Postgres ${{ matrix.pg-version }}) |
| 155 | + steps: |
| 156 | + - uses: actions/checkout@v4 |
| 157 | + |
| 158 | + - name: Setup |
| 159 | + uses: ./.github/setup |
| 160 | + |
| 161 | + - name: Setup pnpm |
| 162 | + uses: pnpm/action-setup@v4 |
| 163 | + with: |
| 164 | + version: 10.15.1 |
| 165 | + run_install: false |
| 166 | + |
| 167 | + - shell: bash |
| 168 | + run: pnpm install |
| 169 | + |
| 170 | + - name: Build package |
| 171 | + run: | |
| 172 | + pnpm --filter "./packages/*" build |
| 173 | +
|
| 174 | + - name: Test PostgreSQL (Postgres ${{ matrix.pg-version }}) |
| 175 | + run: pnpm test:kysely |
| 176 | + env: |
| 177 | + # Ensure Docker is available for Testcontainers |
| 178 | + TESTCONTAINERS_RYUK_DISABLED: true |
| 179 | + PG_VERSION: ${{ matrix.pg-version }} |
0 commit comments