@@ -2,27 +2,46 @@ name: cucumber report
2
2
on :
3
3
push :
4
4
branches :
5
- - master
5
+ - feature/json
6
6
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
14
14
- name : passed
15
15
run : echo $(jq '.[].elements[].steps[].result.status' src/test/resources/cucumber.json | grep -c passed || true) > passed
16
16
- name : failed
17
17
run : echo $(jq '.[].elements[].steps[].result.status' src/test/resources/cucumber.json | grep -c failed || true) > failed
18
- - uses : navikt/bidrag-integration/cucumber-move@master
19
- id : move
18
+ - uses : navikt/bidrag-integration/cucumber-move@feature/json
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
25
- - uses : navikt/bidrag-integration/cucumber-latest@master
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
44
+ - uses : navikt/bidrag-integration/cucumber-latest@feature/json
26
45
id : report
27
46
with :
28
47
relative_filepath : docs/latest/cucumber.json
43
62
if [[ $FAILED -ne $(cat failed) ]]; then
44
63
exit 1;
45
64
fi
46
- - uses : navikt/bidrag-integration/cucumber-status@master
65
+ - uses : navikt/bidrag-integration/cucumber-status@feature/json
47
66
id : status
48
67
with :
49
68
github_page : front-page.md
@@ -52,14 +71,14 @@ jobs:
52
71
timestamp : ${{ steps.report.outputs.time_moved }}
53
72
project_name : bidrag-test-github-actions
54
73
ghp_folder : docs
55
- - uses : navikt/bidrag-integration/reports@master
74
+ - uses : navikt/bidrag-integration/reports@feature/json
56
75
with :
57
76
pages_address : https://navikt.github.io/bidrag-test-github-actions
58
77
path_github_page : ${{ steps.status.outputs.path_edited_page }}
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