-
Notifications
You must be signed in to change notification settings - Fork 1
/
action.yml
64 lines (59 loc) · 1.98 KB
/
action.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
name: 'Run TEAM Engine'
description: 'Spins up a TEAM Engine instance inside a docker container'
branding:
icon: 'award'
color: 'blue'
inputs:
test-suite-identifier:
description: 'Identifier of the Executable Test Suite (etscode) to be run. Example: ogcapi-features-1.0'
test-session-arguments:
description: >
Space-separated string with arguments that are to be sent for running the test session. example:
'iut=http://pygeoapi:5000'
outputs:
results:
description: 'Test results'
value: '${{ steps.run-executable-test-suite.outputs.results }}'
runs:
using: 'composite'
steps:
- name: 'Add action path to the global path'
shell: bash
run: echo "${{ github.action_path }}" >> ${GITHUB_PATH}
- name: 'Set up Python'
uses: actions/setup-python@v5
with:
python-version: '3.10'
- name: 'Set up poetry'
uses: Gr1N/setup-poetry@v9
with:
poetry-version: '1.8.3'
- name: 'Set up cache'
uses: actions/cache@v4
with:
path: ~/.cache/pypoetry/virtualenvs
key: ${{ runner.os }}-poetry-${{ hashFiles('poetry.lock') }}
- name: 'install action code'
shell: 'bash'
run: |
cd ${{ github.action_path }}
poetry install
- name: 'Start TEAM engine'
shell: 'bash'
run: >
docker run
--detach
--rm
--name teamengine
--network host
ogccite/teamengine-production:1.0-SNAPSHOT
- name: 'Run executable test suite'
id: 'run-executable-test-suite'
env:
INPUT_TEST_SUITE_IDENTIFIER: ${{ inputs.test-suite-identifier }}
INPUT_TEST_SESSION_ARGUMENTS: ${{ inputs.test-session-arguments }}
shell: bash
run: |
cd ${{ github.action_path }}
test_result=$(poetry run ogc-cite-action --debug execute-test-suite http://localhost:8080/teamengine ${{ inputs.test-suite-identifier }} ${{ inputs.test-session-arguments }})
echo "${test_result}" >> $GITHUB_STEP_SUMMARY