-
Notifications
You must be signed in to change notification settings - Fork 248
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Split qe test job into multiple jobs because FML
- Loading branch information
Showing
7 changed files
with
308 additions
and
0 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
name: "QE: postgres" | ||
on: | ||
push: | ||
branches: | ||
- main | ||
pull_request: | ||
paths-ignore: | ||
- "!.github/workflows/test-query-engine.yml" | ||
- ".github/**" | ||
- ".buildkite/**" | ||
- "*.md" | ||
- "LICENSE" | ||
- "CODEOWNERS" | ||
- "renovate.json" | ||
|
||
|
||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.ref }} | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
qe-tests: | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
database: | ||
- name: "cockroach_23_1" | ||
connector: "cockroachdb" | ||
version: "23.1" | ||
- name: "cockroach_22_2" | ||
version: "22.2" | ||
- name: "cockroach_22_1_0" | ||
version: "22.1" | ||
uses: ./.github/workflows/test-query-engine-template.yml | ||
with: | ||
name: ${{ matrix.database.name }} | ||
version: ${{ matrix.database.version }} | ||
connector: 'cockroachdb' |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
name: "QE: postgres" | ||
on: | ||
push: | ||
branches: | ||
- main | ||
pull_request: | ||
paths-ignore: | ||
- "!.github/workflows/test-query-engine.yml" | ||
- ".github/**" | ||
- ".buildkite/**" | ||
- "*.md" | ||
- "LICENSE" | ||
- "CODEOWNERS" | ||
- "renovate.json" | ||
|
||
|
||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.ref }} | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
qe-tests: | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
database: | ||
- name: "mongodb_4_2" | ||
version: "4.2" | ||
- name: "mongodb_4_4" | ||
version: "4.4" | ||
- name: "mongodb_5" | ||
connector: "mongodb" | ||
version: "5" | ||
uses: ./.github/workflows/test-query-engine-template.yml | ||
with: | ||
name: ${{ matrix.database.name }} | ||
version: ${{ matrix.database.version }} | ||
single_threaded: true | ||
connector: 'mongodb' | ||
relation_load_strategy: '["query"]' |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
name: "QE: postgres" | ||
on: | ||
push: | ||
branches: | ||
- main | ||
pull_request: | ||
paths-ignore: | ||
- "!.github/workflows/test-query-engine.yml" | ||
- ".github/**" | ||
- ".buildkite/**" | ||
- "*.md" | ||
- "LICENSE" | ||
- "CODEOWNERS" | ||
- "renovate.json" | ||
|
||
|
||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.ref }} | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
qe-tests: | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
database: | ||
- name: "mssql_2022" | ||
version: "2022" | ||
- name: "mssql_2019" | ||
version: "2019" | ||
- name: "mssql_2017" | ||
version: "2017" | ||
uses: ./.github/workflows/test-query-engine-template.yml | ||
with: | ||
name: ${{ matrix.database.name }} | ||
version: ${{ matrix.database.version }} | ||
connector: 'sqlserver' | ||
relation_load_strategy: '["query"]' |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
name: "QE: postgres" | ||
on: | ||
push: | ||
branches: | ||
- main | ||
pull_request: | ||
paths-ignore: | ||
- "!.github/workflows/test-query-engine.yml" | ||
- ".github/**" | ||
- ".buildkite/**" | ||
- "*.md" | ||
- "LICENSE" | ||
- "CODEOWNERS" | ||
- "renovate.json" | ||
|
||
|
||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.ref }} | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
qe-tests: | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
database: | ||
- name: "mysql_5_6" | ||
version: "5.6" | ||
- name: "mysql_5_7" | ||
version: "5.7" | ||
- name: "mysql_8" | ||
version: "8" | ||
- name: "mysql_mariadb" | ||
version: "mariadb" | ||
|
||
uses: ./.github/workflows/test-query-engine-template.yml | ||
with: | ||
name: ${{ matrix.database.name }} | ||
version: ${{ matrix.database.version }} | ||
connector: 'mysql' |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
name: "QE: postgres" | ||
on: | ||
push: | ||
branches: | ||
- main | ||
pull_request: | ||
paths-ignore: | ||
- "!.github/workflows/test-query-engine.yml" | ||
- ".github/**" | ||
- ".buildkite/**" | ||
- "*.md" | ||
- "LICENSE" | ||
- "CODEOWNERS" | ||
- "renovate.json" | ||
|
||
|
||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.ref }} | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
qe-tests: | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
database: | ||
- name: "postgres16" | ||
version: "16" | ||
- name: "postgres15" | ||
version: "15" | ||
- name: "postgres14" | ||
version: "14" | ||
- name: "postgres13" | ||
version: "13" | ||
- name: "postgres12" | ||
version: "12" | ||
- name: "postgres11" | ||
version: "11" | ||
- name: "postgres10" | ||
version: "10" | ||
- name: "postgres9" | ||
version: "9" | ||
uses: ./.github/workflows/test-query-engine-template.yml | ||
with: | ||
name: ${{ matrix.database.name }} | ||
version: ${{ matrix.database.version }} | ||
connector: 'postgres' | ||
single_threaded: true |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
name: "QE: postgres" | ||
on: | ||
push: | ||
branches: | ||
- main | ||
pull_request: | ||
paths-ignore: | ||
- "!.github/workflows/test-query-engine.yml" | ||
- ".github/**" | ||
- ".buildkite/**" | ||
- "*.md" | ||
- "LICENSE" | ||
- "CODEOWNERS" | ||
- "renovate.json" | ||
|
||
|
||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.ref }} | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
qe-tests: | ||
uses: ./.github/workflows/test-query-engine-template.yml | ||
with: | ||
name: 'sqlite' | ||
version: 3 | ||
connector: 'sqlite' | ||
relation_load_strategy: '["query"]' |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,76 @@ | ||
name: "QE: integration template" | ||
on: | ||
workflow_call: | ||
inputs: | ||
name: | ||
type: string | ||
required: true | ||
connector: | ||
type: string | ||
required: true | ||
version: | ||
type: string | ||
required: true | ||
single_threaded: | ||
type: boolean | ||
default: false | ||
relation_load_strategy: | ||
type: string | ||
default: '["join", "query"]' | ||
|
||
|
||
jobs: | ||
rust-query-engine-tests: | ||
name: "${{ inputs.name }} - ${{ matrix.engine_protocol }} ${{ matrix.relation_load_strategy }} ${{ matrix.partition }}" | ||
|
||
strategy: | ||
fail-fast: false | ||
matrix: | ||
engine_protocol: [graphql, json] | ||
relation_load_strategy: ${{ fromJson(inputs.relation_load_strategy) }} | ||
partition: ["1/4", "2/4", "3/4", "4/4"] | ||
|
||
env: | ||
LOG_LEVEL: "info" | ||
LOG_QUERIES: "y" | ||
RUST_LOG_FORMAT: "devel" | ||
RUST_BACKTRACE: "1" | ||
CLICOLOR_FORCE: "1" | ||
CLOSED_TX_CLEANUP: "2" | ||
SIMPLE_TEST_MODE: "1" | ||
QUERY_BATCH_SIZE: "10" | ||
TEST_RUNNER: "direct" | ||
TEST_CONNECTOR: ${{ inputs.connector }} | ||
TEST_CONNECTOR_VERSION: ${{ inputs.version }} | ||
PRISMA_ENGINE_PROTOCOL: ${{ matrix.engine_protocol }} | ||
PRISMA_RELATION_LOAD_STRATEGY: ${{ matrix.relation_load_strategy }} | ||
|
||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: actions-rust-lang/setup-rust-toolchain@v1 | ||
- uses: taiki-e/install-action@nextest | ||
|
||
- name: Login to Docker Hub | ||
uses: docker/login-action@v3 | ||
continue-on-error: true | ||
env: | ||
DOCKERHUB_USERNAME: ${{ secrets.DOCKERHUB_USERNAME }} | ||
DOCKERHUB_TOKEN: ${{ secrets.DOCKERHUB_TOKEN }} | ||
if: "${{ env.DOCKERHUB_USERNAME != '' && env.DOCKERHUB_TOKEN != '' }}" | ||
with: | ||
username: ${{ secrets.DOCKERHUB_USERNAME }} | ||
password: ${{ secrets.DOCKERHUB_TOKEN }} | ||
|
||
- name: "Start ${{ inputs.name }} (${{ matrix.engine_protocol }})" | ||
run: make start-${{ inputs.name }} | ||
|
||
- run: export WORKSPACE_ROOT=$(pwd) && cargo nextest run -p query-engine-tests --partition hash:${{ matrix.partition }} --test-threads=1 | ||
if: ${{ inputs.single_threaded }} | ||
env: | ||
CLICOLOR_FORCE: 1 | ||
|
||
- run: export WORKSPACE_ROOT=$(pwd) && cargo nextest run -p query-engine-tests --partition hash:${{ matrix.partition }} --test-threads=8 | ||
if: ${{ !inputs.single_threaded }} | ||
env: | ||
CLICOLOR_FORCE: 1 |