|
| 1 | +name: Integration Tests |
| 2 | + |
| 3 | +on: |
| 4 | + push: |
| 5 | + branches: [ '**' ] |
| 6 | + pull_request: |
| 7 | + branches: ['**'] |
| 8 | + |
| 9 | +jobs: |
| 10 | + tests: |
| 11 | + runs-on: ubuntu-latest |
| 12 | + env: |
| 13 | + CONNECTIONS: bolt://neo4j:testtest@localhost,http://neo4j:testtest@localhost,neo4j://neo4j:testtest@localhost |
| 14 | + name: "Running Integration tests for PHP 8.0 on Neo4j ${{ matrix.neo4j-version }} with simple config" |
| 15 | + strategy: |
| 16 | + fail-fast: false |
| 17 | + matrix: |
| 18 | + php-version: ["8.0", "8.1", "8.2"] |
| 19 | + neo4j-version: ["5.0", "5.6"] |
| 20 | + |
| 21 | + services: |
| 22 | + neo4j: |
| 23 | + image: neo4j:${{ matrix.neo4j-version }} |
| 24 | + env: |
| 25 | + NEO4J_AUTH: neo4j/testtest |
| 26 | + NEO4JLABS_PLUGINS: '["apoc"]' |
| 27 | + ports: |
| 28 | + - 7687:7687 |
| 29 | + - 7474:7474 |
| 30 | + options: >- |
| 31 | + --health-cmd "wget -q --method=HEAD http://localhost:7474 || exit 1" |
| 32 | + --health-start-period "60s" |
| 33 | + --health-interval "30s" |
| 34 | + --health-timeout "15s" |
| 35 | + --health-retries "5" |
| 36 | + server1: |
| 37 | + image: neo4j:${{ matrix.neo4j-version }}-enterprise |
| 38 | + env: |
| 39 | + NEO4J_initial_server_mode__constraint=PRIMARY |
| 40 | + NEO4J_dbms_cluster_discovery_endpoints=server1:5000,server2:5000,server3:5000 |
| 41 | + NEO4J_ACCEPT_LICENSE_AGREEMENT=yes |
| 42 | + NEO4j_server_bolt_advertised_address=server1:7687 |
| 43 | + NEO4j_server_http_advertised_address=server1:7474 |
| 44 | + NEO4J_AUTH=neo4j/mypassword |
| 45 | + options: >- |
| 46 | + --health-cmd "wget -q --method=HEAD http://localhost:7474 || exit 1" |
| 47 | + --health-start-period "60s" |
| 48 | + --health-interval "30s" |
| 49 | + --health-timeout "15s" |
| 50 | + --health-retries "5" |
| 51 | + server2: |
| 52 | + image: neo4j:${{ matrix.neo4j-version }}-enterprise |
| 53 | + env: |
| 54 | + NEO4J_initial_server_mode__constraint=PRIMARY |
| 55 | + NEO4J_dbms_cluster_discovery_endpoints=server1:5000,server2:5000,server3:5000 |
| 56 | + NEO4J_ACCEPT_LICENSE_AGREEMENT=yes |
| 57 | + NEO4j_server_bolt_advertised_address=server2:7687 |
| 58 | + NEO4j_server_http_advertised_address=server2:7474 |
| 59 | + NEO4J_AUTH=neo4j/mypassword |
| 60 | + options: >- |
| 61 | + --health-cmd "wget -q --method=HEAD http://localhost:7474 || exit 1" |
| 62 | + --health-start-period "60s" |
| 63 | + --health-interval "30s" |
| 64 | + --health-timeout "15s" |
| 65 | + --health-retries "5" |
| 66 | + server3: |
| 67 | + image: neo4j:${{ matrix.neo4j-version }}-enterprise |
| 68 | + env: |
| 69 | + NEO4J_initial_server_mode__constraint=PRIMARY |
| 70 | + NEO4J_dbms_cluster_discovery_endpoints=server1:5000,server2:5000,server3:5000 |
| 71 | + NEO4J_ACCEPT_LICENSE_AGREEMENT=yes |
| 72 | + NEO4j_server_bolt_advertised_address=server3:7687 |
| 73 | + NEO4j_server_http_advertised_address=server3:7474 |
| 74 | + NEO4J_AUTH=neo4j/mypassword |
| 75 | + options: >- |
| 76 | + --health-cmd "wget -q --method=HEAD http://localhost:7474 || exit 1" |
| 77 | + --health-start-period "60s" |
| 78 | + --health-interval "30s" |
| 79 | + --health-timeout "15s" |
| 80 | + --health-retries "5" |
| 81 | + read-server4: |
| 82 | + image: neo4j:${{ matrix.neo4j-version }}-enterprise |
| 83 | + env: |
| 84 | + NEO4J_initial_server_mode__constraint=PRIMARY |
| 85 | + NEO4J_dbms_cluster_discovery_endpoints=server1:5000,server2:5000,server3:5000 |
| 86 | + NEO4J_ACCEPT_LICENSE_AGREEMENT=yes |
| 87 | + NEO4j_server_bolt_advertised_address=read-server4:7687 |
| 88 | + NEO4j_server_http_advertised_address=read-server4:7474 |
| 89 | + NEO4J_AUTH=neo4j/mypassword |
| 90 | + options: >- |
| 91 | + --health-cmd "wget -q --method=HEAD http://localhost:7474 || exit 1" |
| 92 | + --health-start-period "60s" |
| 93 | + --health-interval "30s" |
| 94 | + --health-timeout "15s" |
| 95 | + --health-retries "5" |
| 96 | +
|
| 97 | + steps: |
| 98 | + - uses: actions/checkout@v2 |
| 99 | + - name: Cache Composer dependencies |
| 100 | + uses: actions/cache@v2 |
| 101 | + with: |
| 102 | + path: /tmp/composer-cache |
| 103 | + key: ${{ runner.os }}-${{ hashFiles('**/composer.lock') }} |
| 104 | + - uses: php-actions/composer@v6 |
| 105 | + with: |
| 106 | + progress: yes |
| 107 | + php_version: 8.0 |
| 108 | + version: 2 |
| 109 | + - name: Run unit tests |
| 110 | + run: vendor/bin/phpunit --testsuite Integration |
0 commit comments