File tree Expand file tree Collapse file tree 1 file changed +29
-1
lines changed Expand file tree Collapse file tree 1 file changed +29
-1
lines changed Original file line number Diff line number Diff line change 30
30
31
31
# Finally, run our tests
32
32
- name : Run the tests
33
- run : npm test
33
+ run : npm test
34
+
35
+ - name : Tests ✅
36
+ if : ${{ success() }}
37
+ run : |
38
+ curl --request POST \
39
+ --url https://api.github.com/repos/${{ github.repository }}/statuses/${{ github.sha }} \
40
+ --header 'authorization: Bearer ${{ secrets.GITHUB_TOKEN }}' \
41
+ --header 'content-type: application/json' \
42
+ --data '{
43
+ "context": "tests",
44
+ "state": "success",
45
+ "description": "Tests passed",
46
+ "target_url": "https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}"
47
+ }'
48
+
49
+ - name : Tests 🚨
50
+ if : ${{ failure() }}
51
+ run : |
52
+ curl --request POST \
53
+ --url https://api.github.com/repos/${{ github.repository }}/statuses/${{ github.sha }} \
54
+ --header 'authorization: Bearer ${{ secrets.GITHUB_TOKEN }}' \
55
+ --header 'content-type: application/json' \
56
+ --data '{
57
+ "context": "tests",
58
+ "state": "failure",
59
+ "description": "Tests failed",
60
+ "target_url": "https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}"
61
+ }'
You can’t perform that action at this time.
0 commit comments