Skip to content

Commit 53accb0

Browse files
committed
Testing new solution for Postgres
1 parent 51ef92b commit 53accb0

File tree

2 files changed

+42
-5
lines changed

2 files changed

+42
-5
lines changed

.github/workflows/continuous-integration.yml

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -223,11 +223,10 @@ jobs:
223223

224224
services:
225225
postgres:
226-
image: "postgres:12"
226+
image: postgres:12
227227
env:
228-
POSTGRES_PASSWORD:
229-
ports:
230-
- "5432:5432"
228+
POSTGRES_PASSWORD: postgres
229+
# Set health checks to wait until postgres has started
231230
options: >-
232231
--health-cmd pg_isready
233232
--health-interval 10s
@@ -255,7 +254,7 @@ jobs:
255254
run: "composer install --no-interaction --no-progress --no-suggest"
256255

257256
- name: "Run PHPUnit"
258-
run: "vendor/bin/phpunit -c phpunit.postgres.xml --coverage-clover=coverage.xml"
257+
run: "vendor/bin/phpunit -c phpunit.postgres.github.xml --coverage-clover=coverage.xml"
259258

260259
- name: "Upload Code Coverage"
261260
uses: "codecov/codecov-action@v1"

phpunit.postgres.github.xml

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
3+
<phpunit backupGlobals="false"
4+
backupStaticAttributes="false"
5+
colors="true"
6+
convertErrorsToExceptions="true"
7+
convertNoticesToExceptions="true"
8+
convertWarningsToExceptions="true"
9+
processIsolation="false"
10+
stopOnFailure="false"
11+
bootstrap="vendor/autoload.php"
12+
>
13+
<testsuites>
14+
<testsuite name="TDBM Test Suite">
15+
<directory>./tests/</directory>
16+
</testsuite>
17+
</testsuites>
18+
19+
<php>
20+
<!-- "Real" test database -->
21+
<var name="db_host" value="postgres" />
22+
<var name="db_username" value="postgres" />
23+
<var name="db_password" value="postgres" />
24+
<var name="db_name" value="tdbm_test" />
25+
<var name="db_port" value="5432"/>
26+
<var name="db_driver" value="pdo_pgsql"/>
27+
</php>
28+
29+
<filter>
30+
<whitelist processUncoveredFilesFromWhitelist="true">
31+
<directory suffix=".php">src/</directory>
32+
<exclude>
33+
<directory suffix=".php">src/Test</directory>
34+
<file>src/Schema/LockFileSchemaManager.php</file>
35+
</exclude>
36+
</whitelist>
37+
</filter>
38+
</phpunit>

0 commit comments

Comments
 (0)