A GitHub Action that simplifies testing your OGC server against CITE.
This action is able to either:
- Spin up a docker container with the ogc teamengine image, running test suites in an isolated CI environment
- Use an existing teamengine deployment
This action expects the following inputs to be provided:
test-suite-identfier
- Identifier of the test suite to be executed - See below for existing identifierstest-session-arguments
- Test session arguments to be passed to teamengine. These depend on the test suite that is going to be executed. Regardless, this must be given as a space-separated list ofkey=value
pairsteamengine-url
- Optional URL of the teamengine instance to be used for running tests. If this parameter is not specified then the action will spin up a local teamengine docker container and use it for testing. If you specify a custom teamengine URL this action will also try to find authentication-related env variables and use them. These env variables must be namedteamengine_username
andteamengine_password
Example usage for testing a service running locally at http://localhost:5001
against the ogcapi-features-1.0
executable test suite. Because the teamengine-url
input is not specified, the action spins up a local docker
container running teamengine:
- name: test ogcapi-features compliancy
uses: OSGEO/ogc-cite-action@main
with:
test-suite-identifier: 'ogcapi-features-1.0'
test-session-arguments: 'iut=http://localhost:5001 noofcollections=-1'
env:
teamengine_username: ${{ secrets.TEAMENGINE_USERNAME }}
teamengine_password: ${{ secrets.TEAMENGINE_PASSWORD }}
In order to successfully run this action you need to know:
test-suite-identifier
- the identifier of the test suite you want to runtest-session-arguments
- the parameters that can be passed to the teamengine test runner
Information on existing test suites can be found at:
http://cite.opengeospatial.org/teamengine/
Examples:
-
OGC API Features one must use the following:
test-suite-identifier
:ogcapi-features-1.0
test-session-arguments
:iut
noofcollections
-
OGC API - Processes:
test-suite-identifier
:ogcapi-processes-1.0
test-session-arguments
:iut
noofcollections
-
OGC API - EDR
test-suite-identifier
:ogcapi-edr10
test-session-arguments
:iut
ics
With a bit of extra effort, this action's code can be run locally:
-
Start your service to be tested. Let's assume it is running on
http://localhost:5000
-
Run the teamengine docker image:
docker run --rm --name teamengine --network=host ogccite/teamengine-production:1.0-SNAPSHOT
-
Install the action code with poetry and then run its main script. Here we are executing the test suite for ogcapi-features:
poetry install poetry run ogc-cite-action \ --debug \ execute-test-suite \ http://localhost:8080/teamengine \ ogcapi-features-1.0 \ iut=http://localhost:5000 \ noofcollections=-1