Skip to content

Commit 6793fb7

Browse files
Merge pull request #8 from geo-engine/v2
feat: print exceptions
2 parents 8c902df + 3c0579f commit 6793fb7

File tree

18 files changed

+2721
-5179
lines changed

18 files changed

+2721
-5179
lines changed

.env.example

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ INPUT_SERVICE-URL=http://localhost:8484/
1414
INPUT_OGC-API-PROCESSES=true
1515

1616
# Version of OGC API - Processes to validate against
17-
INPUT_OGC-API-PROCESSES-VERSION=1.3-teamengine-6.0.0-RC2
17+
INPUT_OGC-API-PROCESSES-CONTAINER-TAG=1.3-teamengine-6.0.0-RC2
1818

1919
# The process identifier to run for OGC API - Processes validation
2020
INPUT_ECHOPROCESSID=echo

.github/workflows/linter.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ jobs:
4343

4444
- name: Lint Codebase
4545
id: super-linter
46-
uses: super-linter/super-linter/slim@v8
46+
uses: super-linter/super-linter/slim@v8.2.0
4747
env:
4848
DEFAULT_BRANCH: main
4949
FILTER_REGEX_EXCLUDE: dist/**/*

.licenses/npm/fast-xml-parser.dep.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
name: fast-xml-parser
3-
version: 4.5.3
3+
version: 5.3.0
44
type: npm
55
summary: Validate XML, Parse XML, Build XML without C/C++ based libraries
66
homepage:

.licenses/npm/globrex.dep.yml

Lines changed: 0 additions & 34 deletions
This file was deleted.

.licenses/npm/html-escaper.dep.yml

Lines changed: 0 additions & 30 deletions
This file was deleted.

.licenses/npm/strnum.dep.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
name: strnum
3-
version: 1.1.2
3+
version: 2.1.1
44
type: npm
55
summary: Parse String to Number based on configuration
66
homepage:

.licenses/npm/test-results-parser.dep.yml

Lines changed: 0 additions & 32 deletions
This file was deleted.

.licenses/npm/totalist.dep.yml

Lines changed: 0 additions & 35 deletions
This file was deleted.

README.md

Lines changed: 20 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,6 @@
11
# OGC API Validator GitHub Action
22

3-
<!-- [![GitHub Super-Linter](https://github.com/actions/typescript-action/actions/workflows/linter.yml/badge.svg)](https://github.com/super-linter/super-linter)
4-
![CI](https://github.com/actions/typescript-action/actions/workflows/ci.yml/badge.svg)
5-
[![Check dist/](https://github.com/actions/typescript-action/actions/workflows/check-dist.yml/badge.svg)](https://github.com/actions/typescript-action/actions/workflows/check-dist.yml)
6-
[![CodeQL](https://github.com/actions/typescript-action/actions/workflows/codeql-analysis.yml/badge.svg)](https://github.com/actions/typescript-action/actions/workflows/codeql-analysis.yml)
7-
[![Coverage](./badges/coverage.svg)](./badges/coverage.svg) -->
3+
[![CI](https://github.com/geo-engine/ogc-validator/actions/workflows/ci.yml/badge.svg?branch=main)](https://github.com/geo-engine/ogc-validator/actions/workflows/ci.yml?branch=main)
84

95
This GitHub Action automates the process of validating an OGC API implementation
106
using the OGC CITE validator, e.g., OGC API Processes.
@@ -17,21 +13,32 @@ steps:
1713
with:
1814
service-url: https://example.com
1915
ogc-api-processes: true
20-
ogc-api-processes-version: 1.3-teamengine-6.0.0-RC2
16+
ogc-api-processes-container-tag: 1.3-teamengine-6.0.0-RC2
2117
echoprocessid: echo
2218
ogc-api-processes-ignore: |-
2319
foobar
2420
```
2521
22+
> [!NOTE]
23+
>
24+
> TeamEngine is run using Podman inside the action and uses port `8080`. Ensure
25+
> that the GitHub Actions runner has Podman installed and configured correctly.
26+
> Moreover, the action assumes that the TeamEngine container can bind to port
27+
> `8080`. If this port is already in use on the runner, the action will fail.
28+
> You may need to stop other services or containers that are using this port.
29+
2630
### Inputs
2731

28-
| Name | Description | Required | Default |
29-
| --------------------------- | -------------------------------------------------------------------------------- | -------- | -------------------------- |
30-
| `service-url` | URL of the OGC endpoint to validate | `true` | `http://localhost:8484/` |
31-
| `ogc-api-processes` | If set, validate OGC API - Processes | `false` | `false` |
32-
| `ogc-api-processes-version` | Version of OGC API - Processes to validate against | `false` | `1.3-teamengine-6.0.0-RC2` |
33-
| `echoprocessid` | The process identifier to run for OGC API - Processes validation | `false` | `echo` |
34-
| `ogc-api-processes-ignore` | Multi-line list of test identifiers to ignore for OGC API - Processes validation | `false` | `''` |
32+
| Name | Description | Required | Default |
33+
| --------------------------------- | -------------------------------------------------------------------------------- | -------- | ---------------------------- |
34+
| `service-url` | URL of the OGC endpoint to validate | `true` | `http://localhost:8484/` |
35+
| `ogc-api-processes` | If set, validate OGC API - Processes | `false` | `false` |
36+
| `ogc-api-processes-container-tag` | Container tag to use for OGC API - Processes 1.0 validation | `false` | `1.3-teamengine-6.0.0-RC2` |
37+
| `echoprocessid` | The process identifier to run for OGC API - Processes validation | `false` | `echo` |
38+
| `ogc-api-processes-ignore` | Multi-line list of test identifiers to ignore for OGC API - Processes validation | `false` | `''` |
39+
| `ogc-api-features` | If set, validate OGC API - Features | `false` | `false` |
40+
| `ogc-api-features-container-tag` | Container tag to use for OGC API - Features 1.0 validation | `false` | `1.1.9-teamengine-6.0.0-RC2` |
41+
| `ogc-api-features-ignore` | Multi-line list of test identifiers to ignore for OGC API - Features validation | `false` | `''` |
3542

3643
## Testing with `@github/local-action`
3744

__tests__/main.test.ts

Lines changed: 21 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,13 @@
88
import { jest } from '@jest/globals';
99
import * as core from '../__fixtures__/core.js';
1010
import { waitForWebsite } from '../__fixtures__/wait.js';
11+
import { ogcApiProcessesTestRequest } from '../src/main.js';
1112

1213
// Mocks should be declared before the module being tested is imported.
1314
jest.unstable_mockModule('@actions/core', () => core);
1415
jest.unstable_mockModule('../src/wait.js', () => ({ waitForWebsite }));
1516

16-
const { _validateOGCAPIProcesses } = await import('../src/main.js');
17+
const { _validateOGCAPI } = await import('../src/main.js');
1718

1819
describe('main.ts', () => {
1920
beforeEach(() => {
@@ -80,14 +81,30 @@ describe('main.ts', () => {
8081
} as unknown as Response;
8182
});
8283

83-
const result = await _validateOGCAPIProcesses(
84+
const params = {
85+
serviceUrl: mockServiceUrl,
86+
teamenginePort: 8080,
87+
ogcApiProcesses10: {
88+
containerTag: 'latest',
89+
echoProcessId: mockEchoProcessId,
90+
testsToIgnore: mockIgnoreList,
91+
},
92+
};
93+
94+
const testRequest = ogcApiProcessesTestRequest(
8495
mockServiceUrl,
8596
mockEchoProcessId,
86-
mockIgnoreList
97+
params.ogcApiProcesses10
8798
);
8899

100+
const result = await _validateOGCAPI({
101+
testRequest,
102+
testsToIgnore: mockIgnoreList,
103+
xmlFilePath: '',
104+
});
105+
89106
expect(result).toEqual({
90-
name: 'OGC API - Processes',
107+
name: 'Suite1',
91108
success: true,
92109
passed: 1,
93110
skipped: 1,

0 commit comments

Comments
 (0)