Skip to content
This repository was archived by the owner on Dec 19, 2023. It is now read-only.

Commit 33ef504

Browse files
authored
Merge pull request #25 from navikt/feature/json
tests timestamp and generated folder from json
2 parents 1a138d9 + b7ab27d commit 33ef504

File tree

1 file changed

+23
-4
lines changed

1 file changed

+23
-4
lines changed

.github/workflows/test-cucumber-pages.yaml

Lines changed: 23 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ on:
77
jobs:
88
report-page:
99
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
1111

1212
steps:
1313
- uses: actions/checkout@v2
@@ -16,12 +16,31 @@ jobs:
1616
- name: failed
1717
run: echo $(jq '.[].elements[].steps[].result.status' src/test/resources/cucumber.json | grep -c failed || true) > failed
1818
- uses: navikt/bidrag-integration/cucumber-move@master
19-
id: move
2019
with:
2120
folder_move_from: resources/generated-report
2221
front_page: front-page.md
2322
latest_cucumber_json: resources/cucumber.json
2423
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
2544
- uses: navikt/bidrag-integration/cucumber-latest@master
2645
id: report
2746
with:
@@ -59,7 +78,7 @@ jobs:
5978
- name: check actions output from workflow
6079
run: |
6180
PATH_EDITED_PAGE=${{ steps.status.outputs.path_edited_page }}
62-
GENERATED_FOLDER=${{ steps.move.outputs.generated_folder }}
81+
GENERATED_FOLDER=${{ steps.json.outputs.folder }}
6382
6483
echo "edited page --- $( cat $PATH_EDITED_PAGE )"
6584
echo "generated folder : $GENERATED_FOLDER"
@@ -72,5 +91,5 @@ jobs:
7291
exit 1
7392
fi
7493
- 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 }}
7695
- run: ls -al docs/latest

0 commit comments

Comments
 (0)