Skip to content

Commit 0f6b735

Browse files
Add integration tests to pipeline
1 parent dffc792 commit 0f6b735

File tree

2 files changed

+52
-0
lines changed

2 files changed

+52
-0
lines changed

.github/workflows/main.yml

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,55 @@ jobs:
4646
- name: Run mutation tests
4747
run: XDEBUG_MODE=coverage php vendor/bin/infection --show-mutations --min-msi=${{ env.MINIMUM_MSI_PERCENTAGE }} --threads=4
4848

49+
50+
integration:
51+
name: "Integration testing"
52+
runs-on: ${{ matrix.os }}
53+
continue-on-error: true
54+
55+
strategy:
56+
matrix:
57+
os: [ "ubuntu-latest" ]
58+
neo4j-version: ["4.2", "4.3", "4.4"]
59+
php-version: [ "8.1" ]
60+
61+
services:
62+
neo4j:
63+
image: neo4j:${{ matrix.neo4j-version }}
64+
env:
65+
NEO4J_AUTH: neo4j/test
66+
NEO4JLABS_PLUGINS: '["apoc"]'
67+
ports:
68+
- 7687:7687
69+
- 7474:7474
70+
options: >-
71+
--health-cmd "wget -q --method=HEAD http://localhost:7474 || exit 1"
72+
--health-start-period "60s"
73+
--health-interval "30s"
74+
--health-timeout "15s"
75+
--health-retries "5"
76+
77+
env:
78+
NEO4J_CONNECTIONS: bolt://neo4j:test@localhost,http://neo4j:test@localhost
79+
80+
steps:
81+
- name: Checkout repository
82+
uses: actions/checkout@v3
83+
84+
- name: Setup PHP
85+
uses: shivammathur/setup-php@v2
86+
with:
87+
php-version: ${{ matrix.php-version }}
88+
ini-values: memory_limit=512M
89+
tools: composer:${{ env.COMPOSER_VERSION }}
90+
91+
- name: Install dependencies
92+
run: composer install --no-interaction --prefer-dist --no-progress
93+
94+
- name: Run integration tests
95+
run: php vendor/bin/phpunit --testsuite integration --no-coverage
96+
97+
4998
lint:
5099
name: "Linting"
51100
runs-on: ${{ matrix.os }}

phpunit.xml.dist

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,9 @@
88
<testsuite name="unit">
99
<directory>tests/Unit</directory>
1010
</testsuite>
11+
<testsuite name="integration">
12+
<directory>tests/Integration</directory>
13+
</testsuite>
1114
</testsuites>
1215
<coverage processUncoveredFiles="true" cacheDirectory="coverage/cache" pathCoverage="true">
1316
<report>

0 commit comments

Comments
 (0)