Skip to content

Commit

Permalink
Split qe test job into multiple jobs because FML
Browse files Browse the repository at this point in the history
  • Loading branch information
SevInf committed Jul 11, 2024
1 parent c0c6717 commit 1076509
Show file tree
Hide file tree
Showing 7 changed files with 308 additions and 0 deletions.
38 changes: 38 additions & 0 deletions .github/workflows/test-query-engine-cockroachdb.yml
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'
40 changes: 40 additions & 0 deletions .github/workflows/test-query-engine-mongodb.yml
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"]'
38 changes: 38 additions & 0 deletions .github/workflows/test-query-engine-mssql.yml
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"]'
40 changes: 40 additions & 0 deletions .github/workflows/test-query-engine-mysql.yml
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'
48 changes: 48 additions & 0 deletions .github/workflows/test-query-engine-postgres.yml
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
28 changes: 28 additions & 0 deletions .github/workflows/test-query-engine-sqlite.yml
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"]'
76 changes: 76 additions & 0 deletions .github/workflows/test-query-engine-template.yml
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

0 comments on commit 1076509

Please sign in to comment.