Skip to content

Commit 3c29d77

Browse files
committed
run wiremock in CI
Signed-off-by: Andrew Twydell <[email protected]>
1 parent 2ecb53b commit 3c29d77

File tree

3 files changed

+70
-7
lines changed

3 files changed

+70
-7
lines changed

.github/workflows/main.yml

+41-7
Original file line numberDiff line numberDiff line change
@@ -68,12 +68,6 @@ jobs:
6868
if: ${{ always() && steps.build.outcome == 'success' }}
6969
run: npm run test:unit
7070

71-
- name: E2E Tests
72-
if: ${{ always() && steps.build.outcome == 'success' && matrix.os == 'ubuntu-latest' }}
73-
uses: coactions/setup-xvfb@v1
74-
with:
75-
run: npm run test:e2e
76-
7771
- name: Archive Results
7872
if: ${{ always() && steps.build.outcome == 'success' }}
7973
uses: actions/upload-artifact@v4
@@ -98,9 +92,49 @@ jobs:
9892
# name: zowe-cics-client
9993
# path: dist/*
10094

95+
e2e-test:
96+
runs-on: ubuntu-latest
97+
# needs: test
98+
99+
services:
100+
wiremock:
101+
image: wiremock/wiremock
102+
ports:
103+
- 8080:8080
104+
volumes:
105+
- ${{ github.workspace }}/packages/vsce/__tests__/__e2e__/resources/wiremock:/home/wiremock
106+
options: --name wiremock
107+
108+
steps:
109+
- name: Chown user
110+
run: sudo chown -R $USER:$USER $GITHUB_WORKSPACE
111+
- name: Checkout
112+
uses: actions/checkout@v4
113+
- name: Restart Wiremock with new mappings
114+
run: docker restart wiremock
115+
- name: Use Node.js 22.x
116+
uses: actions/setup-node@v4
117+
with:
118+
node-version: 22.x
119+
- name: Install Dependencies
120+
run: npm ci
121+
- name: Build Source
122+
id: build
123+
run: npm run build
124+
- name: Test Wiremock
125+
if: ${{ always() && steps.build.outcome == 'success' }}
126+
run: curl localhost:8080/__admin/mappings
127+
- name: E2E Tests
128+
if: ${{ always() && steps.build.outcome == 'success' }}
129+
uses: coactions/setup-xvfb@v1
130+
with:
131+
run: npm run test:e2e
132+
101133
release:
102134
if: github.event_name == 'push' && github.ref_protected
103-
needs: test
135+
needs:
136+
- test
137+
- e2e-test
104138
runs-on: ubuntu-latest
105139
permissions:
106140
contents: write
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<response xmlns="http://www.ibm.com/xmlns/prod/CICS/smw2int"
3+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
4+
xsi:schemaLocation="http://www.ibm.com/xmlns/prod/CICS/smw2int https://my.host:12345/CICSSystemManagement/schema/CICSSystemManagement.xsd"
5+
version="3.0" connect_version="0620">
6+
<resultsummary api_response1="1024" api_response2="0" api_response1_alt="OK" api_response2_alt=""
7+
recordcount="2" displayed_recordcount="2" />
8+
<records>
9+
<cicscicsplex _keydata="C3C9C3E2C5E7F6F2C9E8C3E6C5D7C3D4" accesstype="LOCAL" botrsupd="1"
10+
cmasname="MYCMAS" mpstatus="YES" plexname="MYPLEX" readrs="200" rspoolid="DFHRSTAT"
11+
status="ACTIVE" sysid="EPCM" toprsupd="5" transitcmas="" transitcnt="0" updaters="15" />
12+
<cicscicsplex _keydata="C4E4D4D4E8F9F0F7C9E8C3E6C5D7C3D4" accesstype="LOCAL" botrsupd="1"
13+
cmasname="MYCMAS" mpstatus="YES" plexname="DUMMY" readrs="200" rspoolid="DFHRSTAT"
14+
status="ACTIVE" sysid="EPCM" toprsupd="5" transitcmas="" transitcnt="0" updaters="15" />
15+
</records>
16+
</response>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
{
2+
"request": {
3+
"method": "GET",
4+
"url": "/CICSSystemManagement/CICSResultCache/E06EB1264D925C60"
5+
},
6+
"response": {
7+
"status": 200,
8+
"bodyFileName": "ok-cache-plex.xml",
9+
"headers": {
10+
"Content-Type": "text/xml"
11+
}
12+
}
13+
}

0 commit comments

Comments
 (0)