File tree Expand file tree Collapse file tree 1 file changed +65
-0
lines changed Expand file tree Collapse file tree 1 file changed +65
-0
lines changed Original file line number Diff line number Diff line change
1
+ name : Test Neo4j Aura
2
+
3
+ on :
4
+ push :
5
+ branches :
6
+ - master
7
+ workflow_dispatch : # Allows manual trigger
8
+
9
+ concurrency :
10
+ group : ${{ github.ref }}
11
+ cancel-in-progress : true
12
+
13
+ jobs :
14
+ tests-aura :
15
+ name : Run PHPUnit Tests with Neo4j Aura
16
+ runs-on : ubuntu-latest
17
+
18
+ services :
19
+ neo4j :
20
+ image : neo4j:latest
21
+ ports :
22
+ - 7474:7474
23
+ - 7687:7687
24
+ env :
25
+ NEO4J_AUTH : neo4j/password
26
+ options : >-
27
+ --health-cmd "wget --no-verbose --tries=1 --spider http://localhost:7474 || exit 1"
28
+ --health-interval 10s
29
+ --health-retries 5
30
+ --health-timeout 5s
31
+
32
+ steps :
33
+ - name : Checkout code
34
+ uses : actions/checkout@v3
35
+
36
+ - name : Set up PHP
37
+ uses : shivammathur/setup-php@v2
38
+ with :
39
+ php-version : 8.2
40
+ tools : composer, xdebug
41
+
42
+ - name : Cache Composer dependencies
43
+ uses : actions/cache@v3
44
+ with :
45
+ path : vendor
46
+ key : ${{ runner.os }}-composer-${{ hashFiles('composer.lock') }}
47
+ restore-keys : ${{ runner.os }}-composer-
48
+
49
+ - name : Install dependencies
50
+ run : composer install --no-progress --prefer-dist
51
+
52
+ - name : Set Neo4j Environment Variables
53
+ run : |
54
+ echo "NEO4J_ADDRESS=http://localhost:7474" >> $GITHUB_ENV
55
+ echo "NEO4J_USERNAME=neo4j" >> $GITHUB_ENV
56
+ echo "NEO4J_PASSWORD=password" >> $GITHUB_ENV
57
+ echo "NEO4J_AUTH=neo4j/password" >> $GITHUB_ENV
58
+
59
+ - name : Run Tests
60
+ env :
61
+ NEO4J_ADDRESS : ${{ env.NEO4J_ADDRESS }}
62
+ NEO4J_USERNAME : ${{ env.NEO4J_USERNAME }}
63
+ NEO4J_PASSWORD : ${{ env.NEO4J_PASSWORD }}
64
+ NEO4J_AUTH : ${{ env.NEO4J_AUTH }}
65
+ run : vendor/bin/phpunit --configuration phpunit.dist.xml
You can’t perform that action at this time.
0 commit comments