forked from eclipse-tractusx/item-relationship-service
-
Notifications
You must be signed in to change notification settings - Fork 0
119 lines (105 loc) · 4.24 KB
/
tavern-UMBRELLA.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
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
#
# Copyright (c) 2024 Bayerische Motoren Werke Aktiengesellschaft (BMW AG)
# Copyright (c) 2021,2024 Contributors to the Eclipse Foundation
#
# See the NOTICE file(s) distributed with this work for additional
# information regarding copyright ownership.
#
# This program and the accompanying materials are made available under the
# terms of the Apache License, Version 2.0 which is available at
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.
#
# SPDX-License-Identifier: Apache-2.0
#
name: Tavern IRS API Umbrella test
on:
workflow_dispatch: # Trigger manually
schedule:
- cron: '0 1 * * 1-5' # At 01:00 on every day-of-week from Monday through Friday.
# Cancel previous Test executions if a new one is triggered.
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
test:
runs-on: tractusx-runner
steps:
- uses: actions/checkout@v4
- name: setup env
id: setup-env
uses: ./.github/actions/setup-umbrella-env
- name: Setup python
uses: actions/setup-python@v5
with:
python-version: 3.10.7
cache: 'pip'
- name: Install dependencies
run: |
pip install pytest
pip install py
pip install tavern
pip list
- name: Run IRS tests
env:
IRS_HOST: 'http://localhost:8080'
IRS_ESS_HOST: 'http://localhost:8080'
REGULAR_USER_API_KEY: 'password'
ADMIN_USER_API_KEY: 'password'
REGULAR_USER_API_KEY_ESS: 'password'
ADMIN_USER_API_KEY_ESS: 'password'
GLOBAL_ASSET_ID_AS_PLANNED: 'urn:uuid:0733946c-59c6-41ae-9570-cb43a6e4c79e'
GLOBAL_ASSET_ID_ESS_AS_BUILT: 'urn:uuid:2c57b0e9-a653-411d-bdcd-64787e9fd3a7'
BPN_ESS_AS_BUILT: 'BPNL00000003CRHK'
BPN_ESS_INCIDENT: 'BPNS00000003B6LU'
BPN_AS_PLANNED: 'BPNL00000003AYRE'
GLOBAL_ASSET_ID_AS_BUILT: 'urn:uuid:4509ea7c-c8d2-41a1-83ca-c214ee34af6c'
BPN_AS_BUILT: 'BPNL00000003AYRE'
run: |
python -m pytest local/testing/api-tests/irs-api-tests.tavern.yaml --junitxml=tavern-results.xml
- name: Mask credentials
if: always()
run: |
sed "s/access_tok.*:s = '.*'//g" tavern-results.xml | sed "s/Authorization: Bearer .*/Authorization:/g" | uniq > result.xml
- name: Publish Tavern Results
uses: EnricoMi/[email protected]
if: always()
with:
files: |
result.xml
- name: Run ESS tests
if: always() && steps.setup-env.outcome == 'success'
env:
IRS_HOST: 'http://localhost:8080'
IRS_ESS_HOST: 'http://localhost:8080'
REGULAR_USER_API_KEY: 'password'
ADMIN_USER_API_KEY: 'password'
REGULAR_USER_API_KEY_ESS: 'password'
ADMIN_USER_API_KEY_ESS: 'password'
GLOBAL_ASSET_ID_AS_PLANNED: 'urn:uuid:0733946c-59c6-41ae-9570-cb43a6e4c79e'
GLOBAL_ASSET_ID_ESS_AS_BUILT: 'urn:uuid:2c57b0e9-a653-411d-bdcd-64787e9fd3a7'
BPN_ESS_AS_BUILT: 'BPNL00000003CRHK'
BPN_ESS_INCIDENT: 'BPNS00000003B6LU'
BPN_AS_PLANNED: 'BPNL00000003AYRE'
GLOBAL_ASSET_ID_AS_BUILT: 'urn:uuid:4509ea7c-c8d2-41a1-83ca-c214ee34af6c'
BPN_AS_BUILT: 'BPNL00000003AYRE'
run: |
python -m pytest local/testing/api-tests/irs-ess-api-tests.tavern.yaml --junitxml=tavern-ess-results.xml
- name: Mask credentials
if: always()
run: |
sed "s/access_tok.*:s = '.*'//g" tavern-ess-results.xml | sed "s/Authorization: Bearer .*/Authorization:/g" | uniq > ess-result.xml
- name: Publish Tavern Results
uses: EnricoMi/[email protected]
if: always()
with:
files: |
ess-result.xml
- name: Attach logs
if: always() && steps.setup-env.outcome == 'success'
uses: ./.github/actions/umbrella-irs-logs