7
7
jobs :
8
8
report-page :
9
9
runs-on : ubuntu-16.04
10
- name : parse json, count results with and without action and compare results and log files/folders
10
+ name : test a move of a cucumber report and the result for how to generate github pages
11
11
12
12
steps :
13
13
- uses : actions/checkout@v2
@@ -16,12 +16,31 @@ jobs:
16
16
- name : failed
17
17
run : echo $(jq '.[].elements[].steps[].result.status' src/test/resources/cucumber.json | grep -c failed || true) > failed
18
18
- uses : navikt/bidrag-integration/cucumber-move@master
19
- id : move
20
19
with :
21
20
folder_move_from : resources/generated-report
22
21
front_page : front-page.md
23
22
latest_cucumber_json : resources/cucumber.json
24
23
project_where_to_move : bidrag-test-github-actions
24
+ - run : |
25
+ cd $RUNNER_WORKSPACE/bidrag-test-github-actions/docs/latest
26
+ cat bidrag-dev.json
27
+
28
+ TIMESTAMP=$( jq '.timestamp' bidrag-dev.json )
29
+ FOLDER=$( jq '.foldername' bidrag-dev.json )
30
+
31
+ if [[ -z $TIMESTAMP ]]; then
32
+ exit 1
33
+ fi
34
+
35
+ echo "Timestamp: $TIMESTAMP"
36
+
37
+ if [[ -z FOLDER ]]; then
38
+ exit 1
39
+ fi
40
+
41
+ echo "Folder : $FOLDER"
42
+ echo ::set-output name=folder::$FOLDER
43
+ id: json
25
44
- uses : navikt/bidrag-integration/cucumber-latest@master
26
45
id : report
27
46
with :
59
78
- name : check actions output from workflow
60
79
run : |
61
80
PATH_EDITED_PAGE=${{ steps.status.outputs.path_edited_page }}
62
- GENERATED_FOLDER=${{ steps.move .outputs.generated_folder }}
81
+ GENERATED_FOLDER=${{ steps.json .outputs.folder }}
63
82
64
83
echo "edited page --- $( cat $PATH_EDITED_PAGE )"
65
84
echo "generated folder : $GENERATED_FOLDER"
72
91
exit 1
73
92
fi
74
93
- run : ls -al docs/generated
75
- - run : ls -al docs/generated/${{ steps.move .outputs.generated_folder }}
94
+ - run : ls -al docs/generated/${{ steps.json .outputs.folder }}
76
95
- run : ls -al docs/latest
0 commit comments