Skip to content

Commit 82f8ab7

Browse files
committed
Better exceptions
1 parent 7ee0ad9 commit 82f8ab7

2 files changed

Lines changed: 11 additions & 18 deletions

File tree

.github/workflows/php.yml

Lines changed: 7 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -19,15 +19,6 @@ jobs:
1919
ports:
2020
- 3306:3306
2121

22-
postgres:
23-
image: postgres
24-
env:
25-
POSTGRES_USER: root
26-
POSTGRES_PASSWORD: password
27-
POSTGRES_DB: testbench
28-
ports:
29-
- 5432:5432
30-
3122
redis:
3223
image: redis
3324
ports:
@@ -64,8 +55,10 @@ jobs:
6455
touch testbench.sqlite
6556
mysql -e 'CREATE DATABASE testbench' -h127.0.0.1 -uroot -ppassword -P ${{ job.services.mysql.ports[3306] }}
6657
67-
- name: Run test suite (MySQL)
68-
run: vendor/bin/phpunit --testdox --testsuite feature
58+
- name: Start queue workers (via Testbench)
59+
run: |
60+
vendor/bin/testbench queue:work --daemon --quiet &
61+
vendor/bin/testbench queue:work --daemon --quiet &
6962
env:
7063
APP_KEY: base64:i3g6f+dV8FfsIkcxqd7gbiPn2oXk5r00sTmdD6V5utI=
7164
DB_CONNECTION: mysql
@@ -79,14 +72,14 @@ jobs:
7972
REDIS_PASSWORD:
8073
REDIS_PORT: 6379
8174

82-
- name: Run test suite (PostgreSQL)
75+
- name: Run test suite (MySQL)
8376
run: vendor/bin/phpunit --testdox --testsuite feature
8477
env:
8578
APP_KEY: base64:i3g6f+dV8FfsIkcxqd7gbiPn2oXk5r00sTmdD6V5utI=
86-
DB_CONNECTION: pgsql
79+
DB_CONNECTION: mysql
8780
DB_DATABASE: testbench
8881
DB_HOST: 127.0.0.1
89-
DB_PORT: 5432
82+
DB_PORT: 3306
9083
DB_USERNAME: root
9184
DB_PASSWORD: password
9285
QUEUE_CONNECTION: redis

tests/TestCase.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,11 +22,11 @@ public static function setUpBeforeClass(): void
2222
} elseif (TestSuiteSubscriber::getCurrentSuite() === 'unit') {
2323
Dotenv::createImmutable(__DIR__, '.env.unit')->safeLoad();
2424
}
25-
}
2625

27-
for ($i = 0; $i < self::NUMBER_OF_WORKERS; $i++) {
28-
self::$workers[$i] = new Process(['php', __DIR__ . '/../vendor/bin/testbench', 'queue:work']);
29-
self::$workers[$i]->start();
26+
for ($i = 0; $i < self::NUMBER_OF_WORKERS; $i++) {
27+
self::$workers[$i] = new Process(['php', __DIR__ . '/../vendor/bin/testbench', 'queue:work']);
28+
self::$workers[$i]->start();
29+
}
3030
}
3131
}
3232

0 commit comments

Comments
 (0)