ogc-cite-runner 0.3.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (52) hide show
  1. ogc_cite_runner-0.3.0/.github/release.yaml +13 -0
  2. ogc_cite_runner-0.3.0/.github/workflows/ci.yaml +67 -0
  3. ogc_cite_runner-0.3.0/.github/workflows/docs.yaml +59 -0
  4. ogc_cite_runner-0.3.0/.github/workflows/release.yaml +46 -0
  5. ogc_cite_runner-0.3.0/.github/workflows/test-action.yaml +57 -0
  6. ogc_cite_runner-0.3.0/.gitignore +4 -0
  7. ogc_cite_runner-0.3.0/.pre-commit-config.yaml +18 -0
  8. ogc_cite_runner-0.3.0/CHANGELOG.md +76 -0
  9. ogc_cite_runner-0.3.0/LICENSE +21 -0
  10. ogc_cite_runner-0.3.0/PKG-INFO +40 -0
  11. ogc_cite_runner-0.3.0/README.md +9 -0
  12. ogc_cite_runner-0.3.0/_version.py +21 -0
  13. ogc_cite_runner-0.3.0/action.yml +163 -0
  14. ogc_cite_runner-0.3.0/docs/assets/cite-runner-logo-no-text-small.svg +78 -0
  15. ogc_cite_runner-0.3.0/docs/assets/cite-runner-logo-no-text.svg +170 -0
  16. ogc_cite_runner-0.3.0/docs/assets/cite-runner-logo.svg +234 -0
  17. ogc_cite_runner-0.3.0/docs/assets/github-action-demo.png +0 -0
  18. ogc_cite_runner-0.3.0/docs/assets/github-action-log-output.png +0 -0
  19. ogc_cite_runner-0.3.0/docs/assets/github-action-summary.png +0 -0
  20. ogc_cite_runner-0.3.0/docs/assets/ogc-cite-runner-logo.svg +181 -0
  21. ogc_cite_runner-0.3.0/docs/development.md +161 -0
  22. ogc_cite_runner-0.3.0/docs/index.md +74 -0
  23. ogc_cite_runner-0.3.0/docs/ogc-test-suites.md +202 -0
  24. ogc_cite_runner-0.3.0/docs/running-as-github-action.md +492 -0
  25. ogc_cite_runner-0.3.0/docs/running-as-standalone-cli.md +303 -0
  26. ogc_cite_runner-0.3.0/docs/stylesheets/extra.css +38 -0
  27. ogc_cite_runner-0.3.0/mkdocs.yml +44 -0
  28. ogc_cite_runner-0.3.0/pyproject.toml +88 -0
  29. ogc_cite_runner-0.3.0/src/ogc_cite_runner/__init__.py +0 -0
  30. ogc_cite_runner-0.3.0/src/ogc_cite_runner/__main__.py +3 -0
  31. ogc_cite_runner-0.3.0/src/ogc_cite_runner/config.py +94 -0
  32. ogc_cite_runner-0.3.0/src/ogc_cite_runner/exceptions.py +1 -0
  33. ogc_cite_runner-0.3.0/src/ogc_cite_runner/main.py +363 -0
  34. ogc_cite_runner-0.3.0/src/ogc_cite_runner/models.py +84 -0
  35. ogc_cite_runner-0.3.0/src/ogc_cite_runner/parsers/__init__.py +0 -0
  36. ogc_cite_runner-0.3.0/src/ogc_cite_runner/parsers/earl.py +208 -0
  37. ogc_cite_runner-0.3.0/src/ogc_cite_runner/serializers/__init__.py +0 -0
  38. ogc_cite_runner-0.3.0/src/ogc_cite_runner/serializers/console.py +147 -0
  39. ogc_cite_runner-0.3.0/src/ogc_cite_runner/serializers/simple.py +37 -0
  40. ogc_cite_runner-0.3.0/src/ogc_cite_runner/teamengine_runner.py +208 -0
  41. ogc_cite_runner-0.3.0/src/ogc_cite_runner/templates/test-suite-result.md +178 -0
  42. ogc_cite_runner-0.3.0/tests/conftest.py +30 -0
  43. ogc_cite_runner-0.3.0/tests/data/raw-result-csw30.xml +1001 -0
  44. ogc_cite_runner-0.3.0/tests/data/raw-result-ogcapi-edr10-earl.xml +2473 -0
  45. ogc_cite_runner-0.3.0/tests/data/raw-result-ogcapi-features-1.0-earl.xml +4071 -0
  46. ogc_cite_runner-0.3.0/tests/data/raw-result-ogcapi-processes-1.0-earl.xml +1106 -0
  47. ogc_cite_runner-0.3.0/tests/data/raw-result-ogcapi-tiles-1.0-with-cant-tell.xml +508 -0
  48. ogc_cite_runner-0.3.0/tests/data/raw-result-ogcapi-tiles-1.0.xml +5440 -0
  49. ogc_cite_runner-0.3.0/tests/github_action_tests.py +45 -0
  50. ogc_cite_runner-0.3.0/tests/simpleserver.py +302 -0
  51. ogc_cite_runner-0.3.0/tests/test_parsers_earl.py +52 -0
  52. ogc_cite_runner-0.3.0/uv.lock +1266 -0
@@ -0,0 +1,13 @@
1
+ changelog:
2
+ categories:
3
+ - title: Breaking Changes
4
+ labels:
5
+ - Semver-Major
6
+ - breaking-change
7
+ - title: New features
8
+ labels:
9
+ - Semver-Minor
10
+ - enhancement
11
+ - title: Other Changes
12
+ labels:
13
+ - "*"
@@ -0,0 +1,67 @@
1
+ name: Continuous Integration
2
+
3
+ on:
4
+ # will run both when pushing a branch and when pushing a tag
5
+ push:
6
+
7
+ pull_request:
8
+
9
+ # will run when called from another workflow
10
+ workflow_call:
11
+ outputs:
12
+ artifact_name:
13
+ description: "Name of the artifact containing the build package"
14
+ value: ${{ jobs.run_ci.outputs.artifact_name }}
15
+
16
+
17
+ env:
18
+ COLUMNS: 120
19
+
20
+ jobs:
21
+ run_ci:
22
+ runs-on: ubuntu-24.04
23
+ env:
24
+ ARTIFACT_NAME: "python-package"
25
+ outputs:
26
+ artifact_name: ${{ env.ARTIFACT_NAME }}
27
+ steps:
28
+ - name: "Grab code"
29
+ uses: actions/checkout@v4.2.2
30
+ with:
31
+ fetch-depth: "0"
32
+
33
+ - name: "Install uv"
34
+ uses: astral-sh/setup-uv@v5
35
+ with:
36
+ version: "0.6.13"
37
+ enable-cache: true
38
+ cache-dependency-glob: "uv.lock"
39
+
40
+ - name: "Set up Python"
41
+ uses: actions/setup-python@v5
42
+ with:
43
+ python-version-file: "pyproject.toml"
44
+
45
+ - name: "Install code"
46
+ run: uv sync --frozen
47
+
48
+ - name: "Run ruff linter"
49
+ run: uv run ruff check
50
+
51
+ - name: "Run ruff formatter"
52
+ run: uv run ruff format --check
53
+
54
+ - name: "Run tests"
55
+ run: uv run pytest
56
+
57
+ - name: "Build Python package"
58
+ run: uv build
59
+
60
+ - name: "Upload built package as artifact"
61
+ id: upload_package_artifact
62
+ uses: actions/upload-artifact@v4
63
+ if: ${{ github.event_name != 'pull_request' }}
64
+ with:
65
+ name: "${{ env.ARTIFACT_NAME }}"
66
+ path: dist/
67
+ retention-days: 2
@@ -0,0 +1,59 @@
1
+ name: Build and publish Documentation
2
+
3
+ on:
4
+ push:
5
+ branches:
6
+ - main
7
+ paths:
8
+ - 'docs/**'
9
+
10
+ pull_request:
11
+ branches:
12
+ - main
13
+ paths:
14
+ - 'docs/**'
15
+
16
+ jobs:
17
+ build-docs:
18
+ runs-on: ubuntu-24.04
19
+ steps:
20
+ - name: "Grab code"
21
+ uses: actions/checkout@v4.2.2
22
+
23
+ - name: "Install uv"
24
+ uses: astral-sh/setup-uv@v5
25
+ with:
26
+ version: "0.6.13"
27
+ enable-cache: true
28
+ cache-dependency-glob: "uv.lock"
29
+
30
+ - name: "Set up Python"
31
+ uses: actions/setup-python@v5
32
+ with:
33
+ python-version-file: "pyproject.toml"
34
+
35
+ - name: "Install code"
36
+ run: uv sync --frozen
37
+
38
+ - name: "Build docs"
39
+ run: uv run mkdocs build --site-dir built-docs
40
+
41
+ - name: "Upload docs as artifacts"
42
+ uses: actions/upload-pages-artifact@v3.0.1
43
+ with:
44
+ path: built-docs/
45
+
46
+ deploy-docs:
47
+ if: github.ref == 'refs/heads/main'
48
+ needs: build-docs
49
+ runs-on: ubuntu-24.04
50
+ permissions:
51
+ pages: write
52
+ id-token: write
53
+ environment:
54
+ name: github-pages
55
+ url: ${{ steps.deployment.outputs.page_url }}
56
+ steps:
57
+ - name: deploy docs to github pages
58
+ id: deployment
59
+ uses: actions/deploy-pages@v4.0.5
@@ -0,0 +1,46 @@
1
+ name: Release
2
+
3
+ on:
4
+ push:
5
+ tags:
6
+ - "v*"
7
+
8
+ env:
9
+ COLUMNS: 120
10
+
11
+ jobs:
12
+ call_run_ci:
13
+ uses: ./.github/workflows/ci.yaml
14
+
15
+ release:
16
+ needs: call_run_ci
17
+ runs-on: ubuntu-24.04
18
+ permissions:
19
+ id-token: write
20
+ contents: write
21
+ environment:
22
+ name: pypi
23
+ url: https://pypi.org/p/ogc-cite-runner
24
+ steps:
25
+ - name: "Grab code"
26
+ uses: actions/checkout@v4.2.2
27
+ with:
28
+ sparse-checkout: 'CHANGELOG.md'
29
+ sparse-checkout-cone-mode: 'false'
30
+ - name: "Download artifact"
31
+ uses: actions/download-artifact@v4
32
+ with:
33
+ name: ${{ needs.call_run_ci.outputs.artifact_name }}
34
+ path: dist
35
+ - name: "Create GitHub release"
36
+ uses: softprops/action-gh-release@v2.2.1
37
+ with:
38
+ files: dist/*
39
+ fail_on_unmatched_files: true
40
+ generate_release_notes: true
41
+ body_path: CHANGELOG.md
42
+ append_body: true
43
+ - name: "Publish to PyPI"
44
+ uses: pypa/gh-action-pypi-publish@v1.12.4
45
+ with:
46
+ attestations: "true"
@@ -0,0 +1,57 @@
1
+ name: Test ogc-cite-runner as a GitHub action
2
+
3
+ on:
4
+ # will run both when pushing a branch and when pushing a tag
5
+ push:
6
+
7
+ pull_request:
8
+
9
+ # will run when called from another workflow
10
+ workflow_call:
11
+
12
+ env:
13
+ COLUMNS: 120
14
+
15
+ jobs:
16
+ test_ogc_cite_runner_github_action:
17
+ runs-on: ubuntu-24.04
18
+ env:
19
+ SIMPLESERVER_PORT: 9092
20
+ steps:
21
+ - name: "Grab code"
22
+ uses: actions/checkout@v4.2.2
23
+ - name: "Set up Python"
24
+ uses: actions/setup-python@v5
25
+ with:
26
+ python-version-file: "pyproject.toml"
27
+ - name: "Launch simple test server"
28
+ run: |
29
+ nohup python tests/simpleserver.py --bind-address 0.0.0.0 --bind-port ${{ env.SIMPLESERVER_PORT }} > /dev/null 2>&1 &
30
+ echo $! > simpleserver.pid
31
+ sleep 1
32
+ if ps --pid $(cat simpleserver.pid) > /dev/null; then
33
+ echo "simpleserver is up and running with PID $(cat simpleserver.pid)"
34
+ else
35
+ echo "simpleserver failed to start"
36
+ exit 1
37
+ fi
38
+ - name: "Test ogc-cite-runner GitHub action"
39
+ id: test_ogc_cite_runner_github_action
40
+ uses: ./
41
+ with:
42
+ test_suite_identifier: ogcapi-features-1.0
43
+ test_session_arguments: iut=http://host.docker.internal:${{ env.SIMPLESERVER_PORT }}
44
+ exit_with_error: "false"
45
+ - name: "Verify ogc-cite-runner results"
46
+ run: |
47
+ jq '.' <<EOF | python tests/github_action_tests.py -
48
+ ${{ steps.test_ogc_cite_runner_github_action.outputs.json_report }}
49
+ EOF
50
+ - name: "Shut down simple test server"
51
+ if: always()
52
+ run: |
53
+ if [ -f server.pid ]; then
54
+ echo "Shutting down simpleserver with PID $(cat simpleserver.pid)..."
55
+ kill $(cat simpleserver.pid) || true
56
+ rm simpleserver.pid
57
+ fi
@@ -0,0 +1,4 @@
1
+ __pycache__
2
+ _version.py
3
+
4
+ .idea
@@ -0,0 +1,18 @@
1
+ # See https://pre-commit.com for more information
2
+ # See https://pre-commit.com/hooks.html for more hooks
3
+ repos:
4
+ - repo: https://github.com/pre-commit/pre-commit-hooks
5
+ rev: v3.2.0
6
+ hooks:
7
+ - id: trailing-whitespace
8
+ - id: end-of-file-fixer
9
+ - id: check-yaml
10
+ args: [--unsafe, --allow-multiple-documents]
11
+ - id: check-added-large-files
12
+ - repo: https://github.com/astral-sh/ruff-pre-commit
13
+ rev: v0.11.2
14
+ hooks:
15
+ # Run the linter.
16
+ - id: ruff
17
+ # Run the formatter.
18
+ - id: ruff-format
@@ -0,0 +1,76 @@
1
+ # Changelog
2
+
3
+ All notable changes to this project will be documented in this file.
4
+
5
+ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
6
+ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
+
8
+ ## [Unreleased]
9
+
10
+
11
+ ## [v0.3.0] - 2025-05-16
12
+
13
+ ### Changed
14
+
15
+ - Changed name from 'cite-runner' to 'ogc-cite-runner'
16
+
17
+
18
+ ### Fixed
19
+
20
+ - Fixed incorrect mentions to `localhost` in the docs, replacing them with `host.docker.internal`.
21
+
22
+
23
+ ## [v0.2.0] - 2025-05-08
24
+
25
+ ### Added
26
+
27
+ - GitHub action now produces full execution report in JSON format as an output
28
+
29
+ ### Fixed
30
+
31
+ - Fixed running as a GitHub action, which now works again
32
+
33
+
34
+ ## [v0.1.4] - 2025-04-23
35
+
36
+ ### Changed
37
+
38
+ - Switched automated publishing to pypi
39
+
40
+
41
+ ## [v0.1.3] - 2025-04-22
42
+
43
+ ### Fixed
44
+
45
+ - Fixed automated publishing to testpypi
46
+
47
+
48
+ ## [v0.1.2] - 2025-04-21
49
+
50
+ ### Added
51
+
52
+ - Added automated publishing to testpypi
53
+
54
+
55
+ ## [v0.1.1] - 2025-04-21
56
+
57
+ ### Fixed
58
+
59
+ - Fix automated GitHub releases
60
+
61
+
62
+ ## [v0.1.0] - 2025-04-21
63
+
64
+ ### Added
65
+
66
+ - First release
67
+
68
+
69
+ [unreleased]: https://github.com/OSGeo/ogc-cite-runner/compare/v0.3.0...HEAD
70
+ [v0.3.0]: https://github.com/OSGeo/ogc-cite-runner/compare/v0.2.0...v0.3.0
71
+ [v0.2.0]: https://github.com/OSGeo/ogc-cite-runner/compare/v0.1.4...v0.2.0
72
+ [v0.1.4]: https://github.com/OSGeo/ogc-cite-runner/compare/v0.1.3...v0.1.4
73
+ [v0.1.3]: https://github.com/OSGeo/ogc-cite-runner/compare/v0.1.2...v0.1.3
74
+ [v0.1.2]: https://github.com/OSGeo/ogc-cite-runner/compare/v0.1.1...v0.1.2
75
+ [v0.1.1]: https://github.com/OSGeo/ogc-cite-runner/compare/v0.1.0...v0.1.1
76
+ [v0.1.0]: https://github.com/OSGeo/ogc-cite-runner/releases/tag/v0.1.0
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2024 Open Source Geospatial Foundation
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -0,0 +1,40 @@
1
+ Metadata-Version: 2.4
2
+ Name: ogc-cite-runner
3
+ Version: 0.3.0
4
+ Summary: A runner for OGC CITE test suites
5
+ Project-URL: homepage, https://osgeo.github.io/ogc-cite-runner/
6
+ Project-URL: repository, https://github.com/OSGeo/ogc-cite-runner
7
+ Project-URL: documentation, https://osgeo.github.io/ogc-cite-runner/
8
+ Project-URL: Bug Tracker, https://github.com/OSGeo/ogc-cite-runner/issues
9
+ Author-email: Ricardo Garcia Silva <ricardo.garcia.silva@gmail.com>
10
+ Maintainer-email: Ricardo Garcia Silva <ricardo.garcia.silva@gmail.com>
11
+ License-Expression: MIT
12
+ License-File: LICENSE
13
+ Keywords: CITE,OGC,test
14
+ Classifier: Development Status :: 3 - Alpha
15
+ Classifier: Intended Audience :: Developers
16
+ Classifier: License :: OSI Approved :: MIT License
17
+ Classifier: Operating System :: OS Independent
18
+ Classifier: Programming Language :: Python :: 3
19
+ Classifier: Topic :: Scientific/Engineering :: GIS
20
+ Classifier: Topic :: Software Development :: Testing
21
+ Requires-Python: >=3.10
22
+ Requires-Dist: httpx<0.28.0,>=0.27.0
23
+ Requires-Dist: isodate<0.8.0,>=0.7.2
24
+ Requires-Dist: jinja2-humanize-extension<0.5.0,>=0.4.0
25
+ Requires-Dist: jinja2<4.0.0,>=3.1.4
26
+ Requires-Dist: lxml<6.0.0,>=5.3.1
27
+ Requires-Dist: pydantic-settings<3.0.0,>=2.8.1
28
+ Requires-Dist: pydantic<3.0.0,>=2.10.4
29
+ Requires-Dist: typer<0.13.0,>=0.12.3
30
+ Description-Content-Type: text/markdown
31
+
32
+ # ogc-cite-runner
33
+
34
+ Simplify testing your OGC implementation server against [CITE](https://github.com/opengeospatial/cite/wiki). This
35
+ repository contains an OGC CITE runner that can be called as a github action. It can also be used standalone,
36
+ which allows integration with other CI platforms or running locally.
37
+
38
+ Check out the full docs at:
39
+
40
+ https://osgeo.github.io/ogc-cite-runner/
@@ -0,0 +1,9 @@
1
+ # ogc-cite-runner
2
+
3
+ Simplify testing your OGC implementation server against [CITE](https://github.com/opengeospatial/cite/wiki). This
4
+ repository contains an OGC CITE runner that can be called as a github action. It can also be used standalone,
5
+ which allows integration with other CI platforms or running locally.
6
+
7
+ Check out the full docs at:
8
+
9
+ https://osgeo.github.io/ogc-cite-runner/
@@ -0,0 +1,21 @@
1
+ # file generated by setuptools-scm
2
+ # don't change, don't track in version control
3
+
4
+ __all__ = ["__version__", "__version_tuple__", "version", "version_tuple"]
5
+
6
+ TYPE_CHECKING = False
7
+ if TYPE_CHECKING:
8
+ from typing import Tuple
9
+ from typing import Union
10
+
11
+ VERSION_TUPLE = Tuple[Union[int, str], ...]
12
+ else:
13
+ VERSION_TUPLE = object
14
+
15
+ version: str
16
+ __version__: str
17
+ __version_tuple__: VERSION_TUPLE
18
+ version_tuple: VERSION_TUPLE
19
+
20
+ __version__ = version = '0.3.0'
21
+ __version_tuple__ = version_tuple = (0, 3, 0)
@@ -0,0 +1,163 @@
1
+ name: 'ogc-cite-runner'
2
+
3
+ description: 'Runner for OGC CITE'
4
+
5
+ branding:
6
+ icon: 'award'
7
+ color: 'blue'
8
+
9
+ inputs:
10
+ test_suite_identifier:
11
+ description: 'Identifier of the Executable Test Suite (etscode) to be run. Example: ogcapi-features-1.0'
12
+ test_session_arguments:
13
+ description: >
14
+ Space-separated string with arguments that are to be sent for running the test session. example:
15
+ 'iut=http://pygeoapi:5000'
16
+ teamengine_url:
17
+ required: false
18
+ description: >
19
+ URL for the teamengine instance to use for running the test suite. If not provided, this will spin up a docker
20
+ container using the [ogccite/teamengine-production:1.0-SNAPSHOT](https://hub.docker.com/r/ogccite/teamengine-production) image.
21
+ If you specify a custom teamengine URL you may also optonally supply authentication credentials by defining
22
+ them as secrets - Expected secret names are: `teamengine_username` and `teamengine_password`.
23
+ teamengine_username:
24
+ required: false
25
+ default: "ogctest"
26
+ description: Username for accessing teamengine
27
+ teamengine_password:
28
+ required: false
29
+ default: "ogctest"
30
+ description: Password for accessing teamengine
31
+ network_timeout_seconds:
32
+ required: false
33
+ default: "120"
34
+ description: Timeout value for network requests
35
+ with_failed:
36
+ required: false
37
+ default: "false"
38
+ description: Whether the output report should include information about failed tests
39
+ with_skipped:
40
+ required: false
41
+ default: "false"
42
+ description: Whether the output report should include information about skipped tests
43
+ with_passed:
44
+ required: false
45
+ default: "false"
46
+ description: Whether the output report should include information about passed tests
47
+ exit_with_error:
48
+ required: false
49
+ default: "true"
50
+ description: Whether the action exits with an error if the test suite execution shows a result of failed.
51
+
52
+ outputs:
53
+ json_report:
54
+ description: "Full test suite execution result as JSON"
55
+ value: '${{ steps.run_cite_runner.outputs.JSON_REPORT }}'
56
+
57
+ runs:
58
+ using: 'composite'
59
+ steps:
60
+ - name: "Add action path to the global path"
61
+ shell: bash
62
+ run: echo "${{ github.action_path }}" >> ${GITHUB_PATH}
63
+ - name: "normalize action path"
64
+ id: normalize_action_path
65
+ shell: "bash"
66
+ run: |
67
+ echo "ACTION_NORMALIZED_PATH=$(realpath -m ${{ github.action_path }})" >> "${GITHUB_OUTPUT}"
68
+ - name: "Install uv"
69
+ uses: astral-sh/setup-uv@v5
70
+ with:
71
+ version: "0.6.13"
72
+ enable-cache: true
73
+ cache-dependency-glob: "${{ steps.normalize_action_path.outputs.ACTION_NORMALIZED_PATH }}/uv.lock"
74
+ - name: "Set up Python"
75
+ uses: actions/setup-python@v5
76
+ with:
77
+ python-version-file: "${{ github.action_path }}/pyproject.toml"
78
+ - name: "Install ogc-cite-runner"
79
+ env:
80
+ # GITHUB_CONTEXT: ${{ toJSON(github) }}
81
+ # ENV_CONTEXT: ${{ toJSON(env) }}
82
+ SETUPTOOLS_SCM_PRETEND_VERSION: ${{ github.action_ref == 'main' && 'v0.0.0.dev' || github.action_ref }}
83
+ shell: "bash"
84
+ run: |
85
+ cd ${{ github.action_path }}
86
+ uv sync --frozen
87
+ - name: "Start TEAM engine container"
88
+ if: ${{ !inputs.teamengine_url }}
89
+ shell: "bash"
90
+ run: >
91
+ docker run
92
+ --detach
93
+ --rm
94
+ --name teamengine
95
+ --add-host=host.docker.internal:host-gateway
96
+ --publish 9080:8080
97
+ ogccite/teamengine-production:1.0-SNAPSHOT
98
+ - name: "Run ogc-cite-runner"
99
+ id: "run_cite_runner"
100
+ shell: "bash --noprofile --norc -o pipefail {0}"
101
+ run: |
102
+ cd ${{ github.action_path }}
103
+ RAW_PATH=raw-result.xml
104
+ uv run ogc-cite-runner \
105
+ --network-timeout=${{ inputs.network_timeout_seconds }} \
106
+ execute-test-suite-from-github-actions \
107
+ ${{ inputs.teamengine_url || 'http://localhost:9080/teamengine' }} \
108
+ ${{ inputs.test_suite_identifier }} \
109
+ --output-format=raw \
110
+ --teamengine-username=${{ inputs.teamengine_username }} \
111
+ --teamengine-password=${{ inputs.teamengine_password }} \
112
+ $(echo -e ${{ inputs.test_session_arguments }}) 1> ${RAW_PATH}
113
+ if [ $? -ne 0 ]; then
114
+ echo "Unable to use TeamEngine to execute test suite ${{ inputs.test_suite_identifier }} with arguments ${{ inputs.test_session_arguments }}"
115
+ exit 1
116
+ fi
117
+ echo "RAW_RESULT_OUTPUT_PATH=${{ steps.normalize_action_path.outputs.ACTION_NORMALIZED_PATH }}/${RAW_PATH}" >> "${GITHUB_OUTPUT}"
118
+ echo "::group::ogc-cite-runner suite execution results"
119
+ uv run ogc-cite-runner parse-result \
120
+ --output-format console \
121
+ ${{ fromJSON(inputs.exit_with_error) && '--exit-with-error \' || '--exit-without-error \'}}
122
+ --with-summary \
123
+ --with-failed \
124
+ --with-skipped \
125
+ --with-passed \
126
+ ${RAW_PATH}
127
+ echo "CITE_RUNNER_EXIT_CODE=$?" >> "${GITHUB_OUTPUT}"
128
+ echo "::endgroup::"
129
+ MARKDOWN_PATH=test-result.md
130
+ uv run ogc-cite-runner parse-result \
131
+ --output-format markdown \
132
+ --with-summary \
133
+ ${{ fromJSON(inputs.with_failed) && '--with-failed \' || '--without-failed \'}}
134
+ ${{ fromJSON(inputs.with_skipped) && '--with-skipped \' || '--without-skipped \'}}
135
+ ${{ fromJSON(inputs.with_passed) && '--with-passed \' || '--without-passed \'}}
136
+ ${RAW_PATH} 1> ${MARKDOWN_PATH}
137
+ cat ${MARKDOWN_PATH} >> ${GITHUB_STEP_SUMMARY}
138
+ echo "MARKDOWN_RESULT_OUTPUT_PATH=${{ steps.normalize_action_path.outputs.ACTION_NORMALIZED_PATH }}/${MARKDOWN_PATH}" >> "${GITHUB_OUTPUT}"
139
+ echo "JSON_REPORT=$(uv run ogc-cite-runner parse-result \
140
+ --output-format json \
141
+ ${RAW_PATH}
142
+ )" >> "${GITHUB_OUTPUT}"
143
+ - name: "Store execution results as artifacts"
144
+ uses: actions/upload-artifact@v4
145
+ with:
146
+ name: 'execution-results-${{ inputs.test_suite_identifier }}'
147
+ path: |
148
+ ${{ steps.run_cite_runner.outputs.RAW_RESULT_OUTPUT_PATH }}
149
+ ${{ steps.run_cite_runner.outputs.MARKDOWN_RESULT_OUTPUT_PATH }}
150
+ - name: "Stop teamengine container"
151
+ if: ${{ always() && !inputs.teamengine_url }}
152
+ shell: "bash"
153
+ run: docker stop teamengine
154
+ - name: "Set action exit code"
155
+ shell: "bash"
156
+ run: |
157
+ if [ ${{ steps.run_cite_runner.outputs.CITE_RUNNER_EXIT_CODE}} -eq 0 ]; then
158
+ echo "::notice::Test suite has passed"
159
+ exit 0
160
+ else
161
+ echo "::warning::Test suite has failed"
162
+ exit 1
163
+ fi