File tree Expand file tree Collapse file tree 3 files changed +67
-17
lines changed Expand file tree Collapse file tree 3 files changed +67
-17
lines changed Original file line number Diff line number Diff line change
1
+ # Generates an artifact containing the result of the `yarn compile` command.
2
+
3
+ name : Generate PR artifact
4
+
5
+ on :
6
+ pull_request :
7
+ types : [opened, synchronize]
8
+ push :
9
+ branches :
10
+ - " !master"
11
+
12
+ jobs :
13
+ build :
14
+ runs-on : ubuntu-latest
15
+ outputs :
16
+ test-personas-result : ${{ steps.test-personas.outputs.result }}
17
+ steps :
18
+ - uses : actions/checkout@v3
19
+ with :
20
+ ref : ${{ github.ref }}
21
+ - uses : actions/setup-node@v3
22
+ with :
23
+ node-version : 18
24
+ cache : " yarn"
25
+ - run : yarn install --immutable
26
+ - run : git log | head && git status
27
+ - id : build
28
+ name : Build
29
+ run : yarn run build
30
+ - id : test-personas
31
+ name : Test the personas bilans against production
32
+ run : |
33
+ yarn test:personas --markdown > test-personas.res
34
+ body="$(cat test-personas-latest.res | tail --lines=+3 | head --lines=-1)"
35
+ body="${body//'%'/'%25'}"
36
+ body="${body//$'\n'/'%0A'}"
37
+ body="${body//$'\r'/'%0D'}"
38
+ echo "::set-output name=result::${body}"
39
+
40
+ upload-artifact :
41
+ runs-on : ubuntu-22.04
42
+ needs : compile
43
+ steps :
44
+ - name : Create artifact
45
+ run : |
46
+ mkdir -p artifacts
47
+ echo "
48
+ <h1 align="center">Report for the pull request #${{ github.event.pull_request.number }}</h2>
49
+
50
+ ## :couple: Personas changes
51
+
52
+ ### Test personas bilans against latest published version
53
+
54
+ <details open=true>
55
+ <summary>In details</summary>
56
+
57
+ ${{ needs.compile.outputs.test-personas-result }}
58
+
59
+ </details>
60
+
61
+ " > artifacts/result.md
62
+ - name : Upload artifact
63
+ uses : actions/upload-artifact@v1
64
+ with :
65
+ name : pr_message
66
+ path : artifacts
Load Diff This file was deleted.
Original file line number Diff line number Diff line change 36
36
"scripts" : {
37
37
"clean" : " rm -r publicodes-evenements.model.json index.d.ts index.js" ,
38
38
"build" : " node build.js" ,
39
+ "test:personas" : " node tests/testPersonas.js" ,
39
40
"build:watch" : " nodemon -e \" publicodes\" --watch rules/ build.js & nodemon --watch publicodes-evenements.model.json copy.js" ,
40
41
"doc:start" : " node build && cp publicodes-evenements.model.json doc/src && cd doc && yarn run start" ,
41
42
"doc:build" : " node build && cp publicodes-evenements.model.json doc/src && cd doc && yarn run build"
You can’t perform that action at this time.
0 commit comments