generated from actions/typescript-action
-
-
Notifications
You must be signed in to change notification settings - Fork 127
126 lines (115 loc) · 3.96 KB
/
build.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
name: 'CI'
on:
push:
tags:
- '*'
pull_request:
workflow_dispatch:
jobs:
build:
if: github.event_name == 'pull_request' || github.event_name == 'workflow_dispatch'
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: '20'
- name: Install NPM
run: |
npm install
- name: Run NPM
run: |
npm run all
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
test:
if: github.event_name == 'pull_request' || github.event_name == 'workflow_dispatch'
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: '20'
- name: Test JUnit test import
uses: ./
with:
check_name: Example JUnit Test Report
report_paths: '**/surefire-reports/TEST-*.xml'
include_passed: true
detailed_summary: true
summary: '<table><thead><tr><th> Application (src/applications) </th></tr></thead><tbody><tr><td> test </td></tr></tbody></table>'
check_title_template: '{{SUITE_NAME}} | {{TEST_NAME}}'
annotate_only: ${{ github.event_name == 'workflow_dispatch' }}
- name: Test PyTest test import
uses: ./
with:
check_name: Example Pytest Report
report_paths: test_results/python/report_flaky.xml
include_passed: true
detailed_summary: true
comment: true
annotate_only: ${{ github.event_name == 'workflow_dispatch' }}
- name: Test JUnit flaky test import
uses: ./
with:
check_name: Example JUnit Flaky Report
report_paths: test_results/junit-web-test/expectedRetries.xml
include_passed: true
check_retries: true
job_summary: true
detailed_summary: true
flaky_summary: true
annotate_only: ${{ github.event_name == 'workflow_dispatch' }}
- name: Test Multi test import
uses: ./
with:
check_name: |-
Example Multi JUnit Test Report
Example Multi Pytest Report
report_paths: |-
**/surefire-reports/TEST-*.xml
test_results/python/report.xml
summary: |-
<table><thead><tr><th> Application (src/applications) </th></tr></thead><tbody><tr><td> multi test </td></tr></tbody></table>
Custom Summary
check_title_template: |-
{{SUITE_NAME}} | {{TEST_NAME}}
\n
transformers: |
[{"searchValue":"::","replaceValue":"/"}]
annotate_only: ${{ github.event_name == 'workflow_dispatch' }}
- name: Test Nested JUnit test import
uses: ./
with:
check_name: Example Nested JUnit Test Report
report_paths: 'test_results/nested/multi-level.xml'
include_passed: true
detailed_summary: true
group_suite: true
comment: true
skip_annotations: true
check_title_template: '{{TEST_NAME}}'
annotate_only: ${{ github.event_name == 'workflow_dispatch' }}
release:
if: startsWith(github.ref, 'refs/tags/')
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: "Build Changelog"
id: github_release
uses: mikepenz/release-changelog-builder-action@v5
with:
configuration: ".github/config/configuration.json"
ignorePreReleases: true
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Create Release
uses: mikepenz/action-gh-release@v1
with:
body: ${{steps.github_release.outputs.changelog}}
prerelease: ${{ contains(github.ref, '-rc') || contains(github.ref, '-b') || contains(github.ref, '-a') }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}