-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore(ci): run tests on multiple operating systems (#10526)
Co-authored-by: Jan Piotrowski <piotrowski+github@gmail.com> Co-authored-by: Pierre-Antoine Mills <pierreantoine.urvoy@gmail.com>
- Loading branch information
1 parent
f0631b2
commit a397c78
Showing
45 changed files
with
661 additions
and
316 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
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,7 @@ | ||
Invoke-Expression (New-Object System.Net.WebClient).DownloadString('https://get.scoop.sh') | ||
|
||
scoop install mysql | ||
|
||
$DefaultsFile = Join-Path (Resolve-Path ~).Path "scoop\apps\mysql\current\my.ini" | ||
mysqld --install MySQL --defaults-file="$DefaultsFile" | ||
sc start 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,16 @@ | ||
#/bin/bash | ||
|
||
set -ex | ||
|
||
if [ "$RUNNER_OS" = "Windows" ]; then | ||
pwsh .github/workflows/install-mysql.ps1 | ||
fi | ||
|
||
if [ "$RUNNER_OS" = "macOS" ]; then | ||
brew install mysql | ||
brew services run mysql | ||
fi | ||
|
||
echo 'TEST_MYSQL_URI=mysql://root@localhost:3306/tests' >> $GITHUB_ENV | ||
echo 'TEST_MYSQL_URI_MIGRATE=mysql://root@localhost:3306/tests-migrate' >> $GITHUB_ENV | ||
echo 'TEST_MYSQL_SHADOWDB_URI_MIGRATE=mysql://root@localhost:3306/tests-migrate-shadowdb' >> $GITHUB_ENV |
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,25 @@ | ||
#!/bin/bash | ||
|
||
set -ex | ||
|
||
if [ "$RUNNER_OS" = "Windows" ]; then | ||
export PGDATA="$RUNNER_TEMP\\pgdata" | ||
export PGUSER="$USERNAME" | ||
export PATH="$PATH:$(cygpath "$PGBIN")" | ||
export PQ_LIB_DIR="$PGROOT\\lib" | ||
fi | ||
|
||
if [ "$RUNNER_OS" = "macOS" ]; then | ||
export PGDATA="$RUNNER_TEMP/pgdata" | ||
export PGUSER="$USER" | ||
fi | ||
|
||
pg_ctl init | ||
pg_ctl start | ||
createuser --createdb prisma | ||
createdb -O prisma tests | ||
psql -c "ALTER USER prisma PASSWORD 'prisma';" tests | ||
|
||
echo 'TEST_POSTGRES_URI=postgres://prisma:prisma@localhost:5432/tests' >> $GITHUB_ENV | ||
echo 'TEST_POSTGRES_URI_MIGRATE=postgres://prisma:prisma@localhost:5432/tests-migrate' >> $GITHUB_ENV | ||
echo 'TEST_POSTGRES_SHADOWDB_URI_MIGRATE=postgres://prisma:prisma@localhost:5432/tests-migrate-shadowdb' >> $GITHUB_ENV |
Oops, something went wrong.