Skip to content

Commit

Permalink
PHP 8.2 support on tests
Browse files Browse the repository at this point in the history
  • Loading branch information
back-2-95 committed Dec 31, 2022
1 parent 5850725 commit 4e15467
Show file tree
Hide file tree
Showing 4 changed files with 44 additions and 14 deletions.
9 changes: 9 additions & 0 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,9 @@ jobs:
- os: ubuntu-18.04
database-version: 'mysql:5.7'
php-version: '8.1'
- os: ubuntu-18.04
database-version: 'mysql:5.7'
php-version: '8.2'
- os: ubuntu-latest
database-version: 'mysql:8.0'
php-version: '7.4'
Expand All @@ -35,6 +38,9 @@ jobs:
- os: ubuntu-latest
database-version: 'mysql:8.0'
php-version: '8.1'
- os: ubuntu-latest
database-version: 'mysql:8.0'
php-version: '8.2'
- os: ubuntu-18.04
database-version: 'mariadb:10.6'
php-version: '7.4'
Expand All @@ -44,6 +50,9 @@ jobs:
- os: ubuntu-18.04
database-version: 'mariadb:10.6'
php-version: '8.1'
- os: ubuntu-18.04
database-version: 'mariadb:10.6'
php-version: '8.2'

services:
db:
Expand Down
6 changes: 5 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,13 @@ FROM druidfi/php:8.1 as php-81

RUN sudo apk --update --no-cache add php81-pdo php81-pdo_mysql

FROM druidfi/php:8.2 as php-82

RUN sudo apk --update -X https://dl-cdn.alpinelinux.org/alpine/edge/community --no-cache add php82-pdo php82-pdo_mysql

FROM php-${PHP_SHORT_VERSION}

RUN sudo apk --update add --no-cache bash mysql-client \
RUN sudo apk --update --no-cache add bash mysql-client \
&& sudo rm -rf /var/cache/apk/*

WORKDIR /app
Expand Down
29 changes: 16 additions & 13 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -238,19 +238,22 @@ are not available in mysqldump.
Local setup for tests:

```
docker-compose up -d --build
docker-compose exec php74 /app/tests/scripts/create_users.sh
docker-compose exec php74 /app/tests/scripts/create_users.sh db2
docker-compose exec php74 /app/tests/scripts/create_users.sh db3
docker-compose exec -w /app/tests/scripts php74 ./test.sh
docker-compose exec -w /app/tests/scripts php80 ./test.sh
docker-compose exec -w /app/tests/scripts php81 ./test.sh
docker-compose exec -w /app/tests/scripts php74 ./test.sh db2
docker-compose exec -w /app/tests/scripts php80 ./test.sh db2
docker-compose exec -w /app/tests/scripts php81 ./test.sh db2
docker-compose exec -w /app/tests/scripts php74 ./test.sh db3
docker-compose exec -w /app/tests/scripts php80 ./test.sh db3
docker-compose exec -w /app/tests/scripts php81 ./test.sh db3
docker compose up -d --build
docker compose exec php81 /app/tests/scripts/create_users.sh
docker compose exec php81 /app/tests/scripts/create_users.sh db2
docker compose exec php81 /app/tests/scripts/create_users.sh db3
docker compose exec -w /app/tests/scripts php74 ./test.sh
docker compose exec -w /app/tests/scripts php80 ./test.sh
docker compose exec -w /app/tests/scripts php81 ./test.sh
docker compose exec -w /app/tests/scripts php82 ./test.sh
docker compose exec -w /app/tests/scripts php74 ./test.sh db2
docker compose exec -w /app/tests/scripts php80 ./test.sh db2
docker compose exec -w /app/tests/scripts php81 ./test.sh db2
docker compose exec -w /app/tests/scripts php82 ./test.sh db2
docker compose exec -w /app/tests/scripts php74 ./test.sh db3
docker compose exec -w /app/tests/scripts php80 ./test.sh db3
docker compose exec -w /app/tests/scripts php81 ./test.sh db3
docker compose exec -w /app/tests/scripts php82 ./test.sh db3
```

## Credits
Expand Down
14 changes: 14 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -61,3 +61,17 @@ services:
- db
- db2
- db3

php82:
container_name: "mysqldump-php-82"
image: mysqldump-php-tester:php-8.2
build:
context: .
args:
PHP_SHORT_VERSION: "82"
volumes:
- .:/app
depends_on:
- db
- db2
- db3

0 comments on commit 4e15467

Please sign in to comment.