-
Notifications
You must be signed in to change notification settings - Fork 8
59 lines (58 loc) · 1.89 KB
/
test-manual.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
name: TestFrankManual.
on:
push:
paths: srcSteps/Frank2Webapp/**
pull_request:
paths: srcSteps/Frank2Webapp/**
workflow_dispatch:
jobs:
test-frank2webapp:
name: Test Frank2Webapp
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Show input
run: echo ${{ github.event.inputs.forceLatestFF }}
- name: Cache Maven downloads
uses: actions/cache@v3
with:
path: ~/.m2/repository/
key: ${{ runner.os }}-maven
restore-keys: |
Linux-maven
- name: Start Frank2Webapp
run: mvn --log-file log.txt clean install jetty:run &
working-directory: srcSteps/Frank2Webapp/v520
- name: Wait until Frank!Framework is up
# Caching Maven deps is not reliable. We do not want that the test fails if we have to wait for Maven downloads
run: bash .github/workflows/waitForUrl.sh http://localhost:8080/iaf/api/server/health 5000
- name: Capture status
id: captureStatus
uses: fjogeleit/http-request-action@v1
with:
method: GET
url: "http://localhost:8080/iaf/api/server/health"
- name: Analyze status
uses: actions/github-script@v6
with:
script: |
let rawStatus = '${{ steps.captureStatus.outputs.response }}'
core.info('Captured status: ' + rawStatus)
let status = JSON.parse(rawStatus)
if(! status.status) {
core.setFailed('Response has no field "status"')
} else if(status.status !== 'OK') {
core.setFailed('Field "status" is not "OK"')
} else {
core.info('status is OK');
}
- name: Store Maven output
if: always()
uses: actions/upload-artifact@v3
with:
name: mavenLog.txt
path: srcSteps/Frank2Webapp/v520/log.txt
- name: Show files
run: tree -L 5 .
if: always()