|
54 | 54 |
|
55 | 55 | services: |
56 | 56 | mysql: |
57 | | - image: "mysql:8.4" |
| 57 | + image: mysql:8 |
58 | 58 | ports: |
59 | 59 | - "3306:3306" |
60 | 60 | options: >- |
@@ -104,3 +104,107 @@ jobs: |
104 | 104 | env: |
105 | 105 | COVERALLS_REPO_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
106 | 106 | if: ${{ matrix.php-version == env.COVERAGE_PHP_VERSION }} |
| 107 | + |
| 108 | + phpunit-mariadb-pdo: |
| 109 | + name: PHPUnit MariaDB / PDO |
| 110 | + runs-on: ubuntu-22.04 |
| 111 | + |
| 112 | + strategy: |
| 113 | + fail-fast: false |
| 114 | + matrix: |
| 115 | + php-version: |
| 116 | + - "8.2" |
| 117 | + pdo-emulate-prepares: |
| 118 | + - "ON" |
| 119 | + - "OFF" |
| 120 | + |
| 121 | + services: |
| 122 | + mariadb: |
| 123 | + image: mariadb:11 |
| 124 | + env: |
| 125 | + MARIADB_ROOT_PASSWORD: password |
| 126 | + options: >- |
| 127 | + --health-cmd "mariadb-admin ping --silent --user=root --password=password" |
| 128 | + ports: |
| 129 | + - "3306:3306" |
| 130 | + |
| 131 | + steps: |
| 132 | + - name: Checkout |
| 133 | + uses: actions/checkout@v4 |
| 134 | + |
| 135 | + - name: Setup PHP |
| 136 | + uses: shivammathur/setup-php@v2 |
| 137 | + with: |
| 138 | + php-version: ${{ matrix.php-version }} |
| 139 | + extensions: pdo_mysql |
| 140 | + coverage: xdebug |
| 141 | + |
| 142 | + - name: Install composer dependencies |
| 143 | + uses: ramsey/composer-install@v3 |
| 144 | + |
| 145 | + - name: Run PHPUnit with coverage |
| 146 | + run: | |
| 147 | + mkdir -p build/logs |
| 148 | + vendor/bin/phpunit --coverage-clover build/logs/clover.xml |
| 149 | + env: |
| 150 | + DRIVER: mariadb_pdo |
| 151 | + MARIADB_HOST: 127.0.0.1 |
| 152 | + MARIADB_USER: root |
| 153 | + MARIADB_PASSWORD: password |
| 154 | + PDO_EMULATE_PREPARES: ${{ matrix.pdo-emulate-prepares }} |
| 155 | + |
| 156 | + - name: Upload coverage report to Coveralls |
| 157 | + run: vendor/bin/php-coveralls --coverage_clover=build/logs/clover.xml -v |
| 158 | + env: |
| 159 | + COVERALLS_REPO_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
| 160 | + |
| 161 | + phpunit-postgres-pdo: |
| 162 | + name: PHPUnit PostGIS / PDO |
| 163 | + runs-on: ubuntu-22.04 |
| 164 | + |
| 165 | + strategy: |
| 166 | + matrix: |
| 167 | + php-version: |
| 168 | + - "8.2" |
| 169 | + pdo-emulate-prepares: |
| 170 | + - "ON" |
| 171 | + - "OFF" |
| 172 | + |
| 173 | + services: |
| 174 | + postgres: |
| 175 | + image: postgres:17 |
| 176 | + env: |
| 177 | + POSTGRES_USER: postgres |
| 178 | + POSTGRES_PASSWORD: postgres |
| 179 | + ports: |
| 180 | + - "5432:5432" |
| 181 | + |
| 182 | + steps: |
| 183 | + - name: Checkout |
| 184 | + uses: actions/checkout@v4 |
| 185 | + |
| 186 | + - name: Setup PHP |
| 187 | + uses: shivammathur/setup-php@v2 |
| 188 | + with: |
| 189 | + php-version: ${{ matrix.php-version }} |
| 190 | + extensions: pdo_pgsql |
| 191 | + coverage: xdebug |
| 192 | + |
| 193 | + - name: Install composer dependencies |
| 194 | + uses: ramsey/composer-install@v3 |
| 195 | + |
| 196 | + - name: Run PHPUnit with coverage |
| 197 | + run: | |
| 198 | + mkdir -p build/logs |
| 199 | + vendor/bin/phpunit --coverage-clover build/logs/clover.xml |
| 200 | + env: |
| 201 | + DRIVER: postgres_pdo |
| 202 | + POSTGRES_HOST: 127.0.0.1 |
| 203 | + POSTGRES_USER: postgres |
| 204 | + POSTGRES_PASSWORD: postgres |
| 205 | + PDO_EMULATE_PREPARES: ${{ matrix.pdo-emulate-prepares }} |
| 206 | + |
| 207 | + - name: Upload coverage report to Coveralls |
| 208 | + run: vendor/bin/php-coveralls --coverage_clover=build/logs/clover.xml -v |
| 209 | + env: |
| 210 | + COVERALLS_REPO_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
0 commit comments