Skip to content

Commit

Permalink
feat: add mysqldump and configure connections on all environments
Browse files Browse the repository at this point in the history
  • Loading branch information
alexislefebvre committed Jan 28, 2024
1 parent 3fa4887 commit db1a705
Show file tree
Hide file tree
Showing 6 changed files with 7 additions and 11 deletions.
5 changes: 1 addition & 4 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,9 +46,7 @@ jobs:
image: mysql:5.7
env:
MYSQL_ROOT_PASSWORD: root
MYSQL_USER: root
MYSQL_DATABASE: acme
MYSQL_HOST: mariadb
ports:
- 3306:3306
postgresql:
Expand All @@ -69,8 +67,7 @@ jobs:
steps:
- name: Set up hosts file
run: |
echo '127.0.0.1 mariadb' | sudo tee -a /etc/hosts
echo '127.0.0.1 postgres' | sudo tee -a /etc/hosts
echo '127.0.0.1 mariadb postgres' | sudo tee -a /etc/hosts
- name: Install mysqldump
run: |
sudo apt install -y -q ${{ matrix.mysql-client }}
Expand Down
1 change: 1 addition & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ RUN apt-get update \
libsqlite3-dev \
unzip \
wget \
default-mysql-client \
&& docker-php-ext-install \
pdo_mysql \
pdo_pgsql \
Expand Down
4 changes: 2 additions & 2 deletions doc/contributing.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,5 +21,5 @@ docker-compose exec php-fpm composer install
Now you can execute the tests with the following command:

```bash
docker-compose exec php-fpm ./vendor/bin/phpunit
```
docker-compose exec php-fpm ./vendor/bin/phpunit --exclude-group ""
```
2 changes: 0 additions & 2 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,6 @@ services:
environment:
- MYSQL_ROOT_PASSWORD=root
- MYSQL_DATABASE=acme
- MYSQL_USER=root
- MYSQL_PASSWORD=root
ports:
- '11003:3306'

Expand Down
2 changes: 1 addition & 1 deletion tests/AppConfigMysqlUrl/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@

doctrine:
dbal:
url: 'mysql://root:@127.0.0.1:3306/foobar'
url: 'mysql://root:root@mariadb:3306/foobar'
driver: pdo_mysql
4 changes: 2 additions & 2 deletions tests/AppConfigPgsql/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,5 @@ doctrine:
host: postgres
port: 5432
dbname: postgres
user: root
password: root
user: postgres
password: postgres

0 comments on commit db1a705

Please sign in to comment.