-
Notifications
You must be signed in to change notification settings - Fork 0
246 lines (191 loc) · 7.16 KB
/
Copy pathpython-post.yaml
File metadata and controls
246 lines (191 loc) · 7.16 KB
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
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
name: 'Python - Post'
on:
workflow_call:
#
# When you import this workflow use this trigger
# as the example
#
# on:
# workflow_run:
# workflows:
# - CI
# branches-ignore:
# - master
# - development
# - feat-*
# types:
# - completed
permissions:
contents: read # python-report-test
actions: read # python-report-test
checks: write # python-report-test
jobs:
trace:
name: Trace
if: >-
github.event.workflow_run.conclusion == 'success'
&&
github.event.workflow_run.event == 'pull_request'
&&
github.event.workflow_run.head_repository.full_name != github.event.workflow_run.repository.full_name
runs-on: ubuntu-latest
steps:
- name: Trace
shell: bash
run:
echo "***************** export env vars ****************";
export;
echo "***************** Do PR vars show? ****************";
echo "${{ github.pull_request }}";
echo "***************** ****************";
echo "***************** ****************";
- name: "[Trace] Dump event payload"
shell: bash
run: |
jq . "$GITHUB_EVENT_PATH"
- name: "[Trace] Dump environment"
shell: bash
run: |
env | sort
- name: "[Trace] Dump GitHub contexts"
shell: bash
env:
GITHUB_CONTEXT: ${{ toJSON(github) }}
INPUTS_CONTEXT: ${{ toJSON(inputs) }}
VARS_CONTEXT: ${{ toJSON(vars) }}
ENV_CONTEXT: ${{ toJSON(env) }}
JOB_CONTEXT: ${{ toJSON(job) }}
STEPS_CONTEXT: ${{ toJSON(steps) }}
RUNNER_CONTEXT: ${{ toJSON(runner) }}
STRATEGY_CONTEXT: ${{ toJSON(strategy) }}
MATRIX_CONTEXT: ${{ toJSON(matrix) }}
NEEDS_CONTEXT: ${{ toJSON(needs) }}
run: |
echo "===== github ====="
echo "$GITHUB_CONTEXT"
echo "===== inputs ====="
echo "$INPUTS_CONTEXT"
echo "===== vars ====="
echo "$VARS_CONTEXT"
echo "===== env ====="
echo "$ENV_CONTEXT"
echo "===== job ====="
echo "$JOB_CONTEXT"
echo "===== steps ====="
echo "$STEPS_CONTEXT"
echo "===== runner ====="
echo "$RUNNER_CONTEXT"
python-report-test-unit:
name: Unit Test Report
if: >-
github.event.workflow_run.conclusion == 'success'
&&
github.event.workflow_run.event == 'pull_request'
&&
github.event.workflow_run.head_repository.full_name != github.event.workflow_run.repository.full_name
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
- name: Download Unit Test Report
uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # V8.0.1
with:
name: unit-test-results-3.11
repository: nofusscomputing/centurion_erp
run-id: ${{ github.event.workflow_run.id }}
github-token: ${{ github.token }}
- name: Unit Test Report
uses: dorny/test-reporter@a43b3a5f7366b97d083190328d2c652e1a8b6aa2 # v3.0.0
id: test-report-unit
with:
# artifact: unit-test-results-${{ matrix.python-version }}
name: Unit Test Report [Python 3.11]
path: '*.xml'
reporter: java-junit
use-actions-summary: false
python-report-test-functional:
name: Function Test Report
if: >-
github.event.workflow_run.conclusion == 'success'
&&
github.event.workflow_run.event == 'pull_request'
&&
github.event.workflow_run.head_repository.full_name != github.event.workflow_run.repository.full_name
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
- name: Download Functional Test Report
uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # V8.0.1
with:
name: functional-test-results-3.11
repository: nofusscomputing/centurion_erp
run-id: ${{ github.event.workflow_run.id }}
github-token: ${{ github.token }}
- name: Functional Test Report
uses: dorny/test-reporter@a43b3a5f7366b97d083190328d2c652e1a8b6aa2 # v3.0.0
id: test-report-functional
with:
# artifact: functional-test-results-${{ matrix.python-version }}
name: Functional Test Report [Python 3.11]
path: '*.xml'
reporter: java-junit
# fail-on-error: false
use-actions-summary: false
python-report-coverage-unit:
name: Unit Test Coverage Report
if: >-
github.event.workflow_run.conclusion == 'success'
&&
github.event.workflow_run.event == 'pull_request'
&&
github.event.workflow_run.head_repository.full_name != github.event.workflow_run.repository.full_name
runs-on: ubuntu-latest
steps:
- name: Download Coverage Artifact
uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # V8.0.1
with:
name: code-coverage-results-3.11
repository: nofusscomputing/centurion_erp
run-id: ${{ github.event.workflow_run.id }}
github-token: ${{ github.token }}
- name: Debug coverage summary
run: |
pwd
ls -la
file code-coverage-results.md || true
stat code-coverage-results.md || true
- name: create status check/comment for code coverage results
id: jest_coverage_check
uses: im-open/process-code-coverage-summary@e2984f897702d68619d358a834d80a74aa0d9840 # v2.3.1
with:
github-token: ${{ github.token }}
summary-file: code-coverage-results.md
create-pr-comment: true
update-comment-if-one-exists: true
update-comment-key: "${{ env.GITHUB-JOB }}_${{ env.GITHUB-ACTION }}"
python-report-coverage-functional:
name: Functional Test Coverage Report
if: >-
github.event.workflow_run.conclusion == 'success'
&&
github.event.workflow_run.event == 'pull_request'
&&
github.event.workflow_run.head_repository.full_name != github.event.workflow_run.repository.full_name
runs-on: ubuntu-latest
steps:
- name: Download Coverage Artifact
uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # V8.0.1
with:
name: functional-code-coverage-results-3.11
repository: nofusscomputing/centurion_erp
run-id: ${{ github.event.workflow_run.id }}
github-token: ${{ github.token }}
- name: create status check/comment for code coverage results
id: jest_coverage_check
uses: im-open/process-code-coverage-summary@e2984f897702d68619d358a834d80a74aa0d9840 # v2.3.1
with:
github-token: ${{ github.token }}
summary-file: code-coverage-results.md
check-name: 'Functional Code Coverage'
create-pr-comment: true
update-comment-if-one-exists: true
update-comment-key: "${{ env.GITHUB-JOB }}_${{ env.GITHUB-ACTION }}"