Skip to content

Commit

Permalink
MNT Output correct version for databases
Browse files Browse the repository at this point in the history
  • Loading branch information
GuySartorelli committed Feb 22, 2024
1 parent dd462e7 commit bb195a1
Showing 1 changed file with 3 additions and 7 deletions.
10 changes: 3 additions & 7 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -683,15 +683,15 @@ jobs:
if [[ "${{ matrix.db }}" =~ mysql ]]; then
if [[ "${{ matrix.db }}" == "mysql57pdo" ]]; then
echo "mysql version":
mysql --port=3357 --version
mysql --port=3357 --user=root --password=root --execute="SELECT VERSION();" || true
cat << EOF > .env
SS_DATABASE_CLASS="MySQLPDODatabase"
SS_DATABASE_PORT="3357"
EOF
else
MYSQL_PORT=${{ matrix.db == 'mysql57' && '3357' || '3380' }}
echo "mysql version":
mysql --port=$MYSQL_PORT --version
mysql --user=root --password=root --port=$MYSQL_PORT --execute="SELECT VERSION();" || true
cat << EOF > .env
SS_DATABASE_CLASS="MySQLDatabase"
SS_DATABASE_PORT="${MYSQL_PORT}"
Expand All @@ -703,8 +703,6 @@ jobs:
SS_DATABASE_PASSWORD="root"
EOF
elif [[ "${{ matrix.db }}" =~ pgsql ]]; then
echo "postgres version:"
psql --version
cat << EOF > .env
SS_DATABASE_CLASS="PostgreSQLDatabase"
SS_DATABASE_SERVER="localhost"
Expand All @@ -713,8 +711,6 @@ jobs:
SS_DATABASE_PASSWORD="postgres"
EOF
elif [[ "${{ matrix.db }}" =~ sqlite3 ]]; then
echo "sqlite version":
sqlite3 --version
cat << EOF > .env
SS_DATABASE_CLASS="SQLite3Database"
SS_DATABASE_USERNAME="root"
Expand All @@ -723,7 +719,7 @@ jobs:
EOF
elif [[ "${{ matrix.db }}" =~ mariadb ]]; then
echo "mariadb version":
mysql --port=3311 --version
mysql --port=3311 --user=root --password=root --execute="SELECT VERSION();" || true
cat << EOF > .env
SS_DATABASE_SERVER="127.0.0.1"
SS_DATABASE_PORT="3311"
Expand Down

0 comments on commit bb195a1

Please sign in to comment.