Skip to content

Commit

Permalink
Merge eaa6e0c into 1f50a88
Browse files Browse the repository at this point in the history
  • Loading branch information
othercorey committed Aug 1, 2020
2 parents 1f50a88 + eaa6e0c commit 257dcd9
Showing 1 changed file with 14 additions and 19 deletions.
33 changes: 14 additions & 19 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,27 +18,22 @@ jobs:
db-type: [sqlite, mysql, pgsql]
name: PHP ${{ matrix.php-version }} & ${{ matrix.db-type }}

services:
postgres:
image: postgres
ports:
- 5432:5432
env:
POSTGRES_PASSWORD: postgres

steps:
- name: Setup MySQL
if: matrix.db-type == 'mysql'
run: |
if [[ ${{ matrix.php-version }} == '7.2' ]]; then
sudo service mysql stop
# MySQL 8
docker run --rm --name=mysqld -e MYSQL_ROOT_PASSWORD=root --tmpfs /var/lib/mysql:rw --network=host -d mysql --default-authentication-plugin=mysql_native_password --disable-log-bin --innodb-flush-method=O_DIRECT_NO_FSYNC
else
# MySQL 5.7
sudo service mysql start
fi
- name: Setup MySQL latest
if: matrix.db-type == 'mysql' && matrix.php-version == '7.2'
run: docker run --rm --name=mysqld -e MYSQL_ROOT_PASSWORD=root -e MYSQL_DATABASE=cakephp -p 3306:3306 -d mysql --default-authentication-plugin=mysql_native_password --disable-log-bin

- name: Setup MySQL 5.6
if: matrix.db-type == 'mysql' && matrix.php-version == '7.4'
run: docker run --rm --name=mysqld -e MYSQL_ROOT_PASSWORD=root -e MYSQL_DATABASE=cakephp -p 3306:3306 -d mysql:5.6 --character-set-server=utf8

- name: Setup PostgreSQL latest
if: matrix.db-type == 'pgsql' && matrix.php-version == '7.2'
run: docker run --rm --name=postgres -e POSTGRES_PASSWORD=postgres -e POSTGRES_DB=cakephp -p 5432:5432 -d postgres

- name: Setup PostgreSQL 9.4
if: matrix.db-type == 'pgsql' && matrix.php-version == '7.4'
run: docker run --rm --name=postgres -e POSTGRES_PASSWORD=postgres -e POSTGRES_DB=cakephp -p 5432:5432 -d postgres:9.4
- uses: actions/checkout@v1
with:
fetch-depth: 1
Expand Down

0 comments on commit 257dcd9

Please sign in to comment.