{"id":27224898,"url":"https://github.com/osgeo/cite-runner","last_synced_at":"2025-04-10T10:45:58.307Z","repository":{"id":227129203,"uuid":"768925142","full_name":"OSGeo/cite-runner","owner":"OSGeo","description":"Runner for testing your OGC server implementation against OGC CITE","archived":false,"fork":false,"pushed_at":"2025-04-08T17:00:05.000Z","size":240,"stargazers_count":5,"open_issues_count":8,"forks_count":2,"subscribers_count":9,"default_branch":"main","last_synced_at":"2025-04-09T04:07:22.028Z","etag":null,"topics":["cite","compliance","ogc","osgeo"],"latest_commit_sha":null,"homepage":"https://osgeo.github.io/cite-runner/","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/OSGeo.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-03-08T01:34:25.000Z","updated_at":"2025-04-08T17:00:10.000Z","dependencies_parsed_at":"2024-03-11T19:43:43.240Z","dependency_job_id":"cf7ed8a3-a7ba-4577-8de1-eb9a6ad365f9","html_url":"https://github.com/OSGeo/cite-runner","commit_stats":{"total_commits":19,"total_committers":3,"mean_commits":6.333333333333333,"dds":"0.42105263157894735","last_synced_commit":"1a667bcd5cea6ad363acad60e1e8f8db52e9f141"},"previous_names":["osgeo/ogc-cite-action","osgeo/cite-runner"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/OSGeo%2Fcite-runner","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/OSGeo%2Fcite-runner/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/OSGeo%2Fcite-runner/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/OSGeo%2Fcite-runner/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/OSGeo","download_url":"https://codeload.github.com/OSGeo/cite-runner/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248201291,"owners_count":21064089,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cite","compliance","ogc","osgeo"],"created_at":"2025-04-10T10:45:57.706Z","updated_at":"2025-04-10T10:45:58.302Z","avatar_url":"https://github.com/OSGeo.png","language":"Python","readme":"# cite-runner\n\nSimplify testing your OGC implementation server against [CITE](https://github.com/opengeospatial/cite/wiki). This repo\ncontains a CITE runner that can be called as a github action. It can also be used standalone, which allows integration\nwith other CI platforms or running locally.\n\nThis code can either:\n\n- Spin up a docker container with the [ogc teamengine image](https://hub.docker.com/r/ogccite/teamengine-production),\n  running test suites in an isolated CI environment\n- Use an existing teamengine deployment\n\n\n## Running as a github action\n\n### Inputs\n\nThis action expects the following inputs to be provided:\n\n- `test_suite_identfier` - Identifier of the test suite to be executed. Test suite identifiers can be gotten from the\n  documentation at \u003chttp://cite.opengeospatial.org/teamengine/\u003e. Example:\n\n  ```yaml\n  test_suite_identifier: 'ogcapi-features-1.0'\n  ```\n\n- `test_session_arguments` - Test session arguments to be passed to teamengine. These depend on the test suite that is\n  going to be executed. Must be provided as a space-separated list of `key=value` pairs. Examples:\n\n  - A simple yaml string\n    ```yaml\n    test_session_arguments: 'iut=http://localhost:5001 noofcollections=-1'\n    ```\n\n  - If you prefer to use a multiline string, then  we recommend use of YAML *folded blocks* with the _strip_\n    chomping indicator (AKA put a dash after the folded block indicator, AKA this: `\u003e-`)\n    ```yaml\n    test_session_arguments: \u003e-\n      iut=http://localhost:5001\n      noofcollections=-1\n    ```\n\n- `teamengine_url` - **OPTIONAL** - URL of the teamengine instance to be used for running tests. If this parameter\n  is not specified then the action will spin up a local teamengine docker container and use it for testing. If you\n  specify a custom teamengine URL this action will also try to find authentication-related env variables and use\n  them. These env variables must be named `teamengine_username` and `teamengine_password`\n\n  That the value of this paramenter must be the URL of the landing page of the teamengine service, which usually is\n  located at the `/teamengine` path. Examples:\n\n  - When spinning up a local docker instance there is no need to supply this argument\n\n  - When using the remote teamengine instance located at `https://my-server` with a pre-existing user `myself` and\n    a password of `something`:\n\n    ```yaml\n    teamengine_url: 'https://my-server/teamengine'\n    teamengine_username: 'myself'\n    teamengine_password: 'something'\n    ```\n\n- `teamengine_username` - **OPTIONAL** - Username to be used when logging in to a remote teamengine instance.\n  Defaults to `ogctest`, which is a user that is pre-created on the official teamengine docker image.\n\n- `teamengine_password` - **OPTIONAL** - Password to be used when logging in to a remote teamengine instance.\n  Defaults to `ogctest`, which is the password used for the pre-created user on the official teamengine docker image\n\n- `treat_skipped_tests_as_failures` - **OPTIONAL** - Whether the presence of skipped tests should be interpreted as\n  an overall failure of the test suite or not. Defaults to `false`\n\n- `network_timeout_seconds` - **OPTIONAL** - Timeout value for network requests. Defaults to `120`\n\n### Usage\n\nThe below examples define a github workflow for testing pygeoapi.\n\nSimple usage, running the `ogcapi-features-1.0` test suite whenever there is a `push`:\n\n```yaml\non:\n  push:\n\njobs:\n\n  perform-cite-testing:\n    runs-on: ubuntu-22.04\n    steps:\n      - name: grab code\n        uses: actions/checkout@v4\n\n      - name: start pygeoapi with suitable CITE data and config\n        run: \u003e\n          docker compose -f tests/cite/compose.test-cite.yaml up --detach\n\n      - name: wait for pygeoapi to be usable\n        uses: raschmitt/wait-for-healthy-container@v1.0.1\n        with:\n          container-name: pygeoapi-cite-pygeoapi-1\n          timeout: 120\n\n      - name: test ogcapi-features compliancy\n        uses: OSGEO/cite-runner@main\n        with:\n          test_suite_identifier: 'ogcapi-features-1.0'\n          test_session_arguments: \u003e-\n            iut=http://localhost:5001\n            noofcollections=-1\n```\n\nA slightly more complex example, using a matrix to test both `ogcapi-features-1.0`\nand `ogcapi-processes-1.0` test suites in parallel:\n\n```yaml\non:\n  push:\n\nenv:\n  COLUMNS: 120\n\n\njobs:\n\n  perform-cite-testing:\n    strategy:\n      matrix:\n        test-suite:\n          - suite-id: ogcapi-features-1.0\n            arguments: \u003e-\n              iut=http://localhost:5001\n              noofcollections=-1\n          - suite-id: ogcapi-processes-1.0\n            arguments: \u003e-\n              iut=http://localhost:5001\n              noofcollections=-1\n\n    runs-on: ubuntu-22.04\n    steps:\n\n      - name: grab code\n        uses: actions/checkout@v4\n\n      - name: start pygeoapi with suitable CITE data and config\n        run: \u003e\n          docker compose -f tests/cite/compose.test-cite.yaml up --detach\n\n      - name: wait for pygeoapi to be usable\n        uses: raschmitt/wait-for-healthy-container@v1.0.1\n        with:\n          container-name: pygeoapi-cite-pygeoapi-1\n          timeout: 120\n\n      - name: collect docker logs on failure\n        if: failure()\n        uses: jwalton/gh-docker-logs@v2.2.2\n        with:\n          images: ghcr.io/geopython/pygeoapi\n          tail: 500\n\n      - name: test ogcapi-features compliancy\n        uses: OSGEO/cite-runner@main\n        with:\n          test_suite_identifier: ${{ matrix.test-suite.suite-id }}\n          test_session_arguments: ${{ matrix.test-suite.arguments }}\n\n```\n\n\n## Running locally or on other CI platforms\n\nThis action's code can also be installed locally:\n\n- Install [poetry](https://python-poetry.org/docs/)\n- Clone this repository:\n\n  ```shell\n  git clone https://github.com/OSGeo/cite-runner.git\n  ```\n- Install the code:\n\n  ```shell\n  cd cite-runner\n  poetry install\n  ```\n\n- Start your service to be tested. Let's assume it is already running on `http://localhost:5000`\n\n- Run the teamengine docker image locally:\n\n  ```shell\n  docker run \\\n    --rm \\\n    --name teamengine \\\n    --network=host \\\n    ogccite/teamengine-production:1.0-SNAPSHOT\n  ```\n\n- Run the action code with\n\n  ```shell\n  poetry run cite-runner --help\n  ```\n\nThere are additional commands and options which can be used when running locally, which allow controlling the output\nformat and how the inputs are supplied. Read the online\n\n\n## Test suites which are known to work\n\n\u003ctable\u003e\n\u003cthead\u003e\n\u003ctr\u003e\n\u003cth\u003etest suite identifier\u003c/th\u003e\n\u003cth\u003earguments\u003c/th\u003e\n\u003c/tr\u003e\n\u003c/thead\u003e\n\u003ctbody\u003e\n\u003ctr\u003e\n    \u003ctd\u003eogcapi-features-1.0\u003c/td\u003e\n    \u003ctd\u003e\n      \u003cul\u003e\n        \u003cli\u003eiut\u003c/li\u003e\n        \u003cli\u003enoofcollections\u003c/li\u003e\n      \u003c/ul\u003e\n    \u003c/td\u003e\n\u003c/tr\u003e\n\u003ctr\u003e\n    \u003ctd\u003eogcapi-processes-1.0\u003c/td\u003e\n    \u003ctd\u003e\n      \u003cul\u003e\n        \u003cli\u003eiut\u003c/li\u003e\n        \u003cli\u003enoofcollections\u003c/li\u003e\n      \u003c/ul\u003e\n    \u003c/td\u003e\n\u003c/tr\u003e\n\u003ctr\u003e\n    \u003ctd\u003eogcapi-edr10\u003c/td\u003e\n    \u003ctd\u003e\n      \u003cul\u003e\n        \u003cli\u003eiut\u003c/li\u003e\n        \u003cli\u003eapiDefinition\u003c/li\u003e\n      \u003c/ul\u003e\n    \u003c/td\u003e\n\u003c/tr\u003e\n\u003ctr\u003e\n    \u003ctd\u003eogcapi-tiles10\u003c/td\u003e\n    \u003ctd\u003e\n      \u003cul\u003e\n        \u003cli\u003eiut\u003c/li\u003e\n        \u003cli\u003etilematrixsetdefnitionuri\u003c/li\u003e\n        \u003cli\u003eurltemplatefortiles\u003c/li\u003e\n        \u003cli\u003etilematrix\u003c/li\u003e\n        \u003cli\u003emintilerow\u003c/li\u003e\n        \u003cli\u003emaxtilerow\u003c/li\u003e\n        \u003cli\u003emintilecol\u003c/li\u003e\n        \u003cli\u003emaxtilecol\u003c/li\u003e\n      \u003c/ul\u003e\n    \u003c/td\u003e\n\u003c/tr\u003e\n\u003c/tbody\u003e\n\u003c/table\u003e\n\n\n## Development\n\nAfter having clone this repo, install the code with dev dependencies by running:\n\n```shell\npoetry install --with dev\n```\n\nEnable the pre-commit hooks by running\n\n```shell\npoetry run pre-commit install\n```\n\nOptionally, do a first run of pre-commit on all files, which will also initialize\npre-commit's hooks\n\n```shell\npoetry run pre-commit run --all-files\n```\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fosgeo%2Fcite-runner","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fosgeo%2Fcite-runner","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fosgeo%2Fcite-runner/lists"}