Skip to content

Commit 8d40792

Browse files
committed
Added phpunit.dist.xml file
1 parent aea8384 commit 8d40792

File tree

2 files changed

+23
-8
lines changed

2 files changed

+23
-8
lines changed

.github/workflows/ci.yml

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ name: CI Pipeline
33
on:
44
push:
55
branches:
6-
- main # Ignore all branches pushed as part of a pull request
6+
- main
77
pull_request:
88
branches:
99
- main
@@ -37,12 +37,11 @@ jobs:
3737
- name: Install dependencies
3838
run: composer install --no-progress --prefer-dist
3939

40-
- name: Verify phpunit.xml
40+
- name: Set up environment variables from secrets
4141
run: |
42-
if [ ! -f phpunit.xml ]; then
43-
echo "phpunit.xml not found, ensure the configuration file exists."
44-
exit 1
45-
fi
42+
echo "NEO4J_ADDRESS=${{ secrets.NEO4J_ADDRESS }}" >> $GITHUB_ENV
43+
echo "NEO4J_USERNAME=${{ secrets.NEO4J_USERNAME }}" >> $GITHUB_ENV
44+
echo "NEO4J_PASSWORD=${{ secrets.NEO4J_PASSWORD }}" >> $GITHUB_ENV
4645
47-
- name: Run Tests
48-
run: vendor/bin/phpunit
46+
- name: Run Tests without phpunit.xml
47+
run: vendor/bin/phpunit --configuration phpunit.dist.xml --testdox

phpunit.dist.xml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<phpunit bootstrap="vendor/autoload.php">
3+
<!-- Test Suite Configuration -->
4+
<testsuites>
5+
<testsuite name="Application Test Suite">
6+
<directory>./tests</directory> <!-- Path to your tests directory -->
7+
</testsuite>
8+
</testsuites>
9+
10+
<!-- Logging -->
11+
<logging>
12+
<log type="testdox" target="php://stdout" />
13+
</logging>
14+
15+
<!-- No need to set sensitive information here -->
16+
</phpunit>

0 commit comments

Comments
 (0)