Skip to content

Commit 76585b7

Browse files
committed
Test against GeoServer supported releases
1 parent 97df797 commit 76585b7

4 files changed

Lines changed: 19 additions & 12 deletions

File tree

.github/workflows/run-tests.yml

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,16 @@ jobs:
1313
fail-fast: true
1414
matrix:
1515
os: [ubuntu-latest]
16-
php: [7.4, 8.0, 8.1]
17-
stability: [prefer-stable] # prefer-lowest
16+
php: [7.4, 8.0, 8.1]
17+
geoserver: ["2.20.4", "2.21.0"]
18+
exclude:
19+
- geoserver: "2.20.4"
20+
php: 7.4
1821

19-
name: P${{ matrix.php }} - ${{ matrix.stability }} - ${{ matrix.os }}
22+
name: P${{ matrix.php }} - G${{ matrix.geoserver }}
23+
24+
env:
25+
GEOSERVER_TAG: ${{ matrix.geoserver }}
2026

2127
steps:
2228
- name: Checkout code
@@ -36,7 +42,7 @@ jobs:
3642
3743
- name: Install dependencies
3844
run: |
39-
composer update --${{ matrix.stability }} --prefer-dist --no-interaction
45+
composer update --prefer-dist --no-interaction
4046
4147
- name: Create Environment
4248
run: |
@@ -46,8 +52,8 @@ jobs:
4652
- name: Execute tests
4753
env:
4854
GEOSERVER_URL: "http://127.0.0.1:8600/geoserver/"
49-
GEOSERVER_USER: "admin"
50-
GEOSERVER_PASSWORD: "geoserver"
55+
GEOSERVER_USER: "GEOSERVER_ADMIN_USER"
56+
GEOSERVER_PASSWORD: "GEOSERVER_ADMIN_PASSWORD"
5157
run: vendor/bin/phpunit
5258

5359
- name: Stop Environment

docs/tests.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,8 @@ vendor/bin/phpunit
88

99
By default integration tests are not executed unless in the phpunit.xml file a GeoServer instance is specified.
1010

11-
The `phpunit.xml.dist` define the `GEOSERVER_URL`, `GEOSERVER_USER`, `GEOSERVER_PASSWORD` for that purpose.
11+
The `phpunit.xml.dist` define the `GEOSERVER_URL`, `GEOSERVER_USER`,
12+
`GEOSERVER_PASSWORD` for that purpose.
1213
If you want you can copy `phpunit.xml.dist` to `phpunit.xml` and edit those variables in place
1314
or define them in your environment variables.
1415

tests/Integration/GeoServerDataStoresTest.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -252,10 +252,10 @@ public function test_geopackage_can_be_uploaded_and_deleted()
252252
$this->assertNotNull($feature->nativeBoundingBox);
253253
$this->assertNotNull($feature->boundingBox);
254254
$this->assertEquals("EPSG:4326", $feature->boundingBox->crs);
255-
$this->assertEquals(-165.18163033675, $feature->boundingBox->minX);
256-
$this->assertEquals(-50.786361166949, $feature->boundingBox->minY);
257-
$this->assertEquals(176.5891535779, $feature->boundingBox->maxX);
258-
$this->assertEquals(73.578794485117, $feature->boundingBox->maxY);
255+
$this->assertEquals(-180.00000000000003, $feature->boundingBox->minX);
256+
$this->assertEquals(-85, $feature->boundingBox->minY);
257+
$this->assertEquals(180.00000000000003, $feature->boundingBox->maxX);
258+
$this->assertEquals(85, $feature->boundingBox->maxY);
259259

260260
$this->assertTrue($this->geoserver->exist($data), "Data not existing after upload");
261261

tests/docker-compose.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ networks:
88

99
services:
1010
geoserver:
11-
image: "kartoza/geoserver:${GEOSERVER_TAG:-2.17.0}"
11+
image: "kartoza/geoserver:${GEOSERVER_TAG:-2.21.0}"
1212
env_file:
1313
- geoserver.env
1414
ports:

0 commit comments

Comments
 (0)