Skip to content

Commit

Permalink
DRIVER_ADAPTERS_BRANCH=driver-adapters-migration see if this works
Browse files Browse the repository at this point in the history
  • Loading branch information
miguelff committed Oct 25, 2023
1 parent cba8e8f commit 6476541
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 1 deletion.
13 changes: 13 additions & 0 deletions .github/workflows/query-engine-driver-adapters.yml
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,19 @@ jobs:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}

- name: Check Commit Message
id: check-commit-message
run: echo "${{ github.event.head_commit.message }}" | grep -q 'DRIVER_ADAPTERS_BRANCH='

- name: Extract Branch Name
id: extract-branch
if: steps.check-commit-message.outputs.return-code == 0
run: echo "::set-output name=branch::$(echo ${{ github.event.head_commit.message }} | grep -o "DRIVER_ADAPTERS_BRANCH=[^ ]*" | cut -f2 -d=)"

- name: Set Environment Variable
if: steps.extract-branch.outputs.branch != ''
run: echo "DRIVER_ADAPTERS_BRANCH=${{ steps.extract-branch.outputs.branch }}" >> $GITHUB_ENV

- run: make ${{ matrix.adapter.setup_task }}

- uses: dtolnay/rust-toolchain@stable
Expand Down
3 changes: 2 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ CONFIG_PATH = ./query-engine/connector-test-kit-rs/test-configs
CONFIG_FILE = .test_config
SCHEMA_EXAMPLES_PATH = ./query-engine/example_schemas
DEV_SCHEMA_FILE = dev_datamodel.prisma
DRIVER_ADAPTERS_BRANCH ?= main

LIBRARY_EXT := $(shell \
case "$$(uname -s)" in \
Expand Down Expand Up @@ -286,7 +287,7 @@ ensure-prisma-present:
echo "⚠️ ../prisma diverges from prisma/prisma main branch. Test results might diverge from those in CI ⚠️ "; \
fi \
else \
git clone --depth=1 https://github.com/prisma/prisma.git "../prisma" && echo "Prisma repository has been cloned to ../prisma"; \
git clone --depth=1 https://github.com/prisma/prisma.git --branch=$(DRIVER_ADAPTERS_BRANCH) "../prisma" && echo "Prisma repository has been cloned to ../prisma"; \
fi;

# Quick schema validation of whatever you have in the dev_datamodel.prisma file.
Expand Down

0 comments on commit 6476541

Please sign in to comment.