-
Notifications
You must be signed in to change notification settings - Fork 508
42 lines (35 loc) · 1.18 KB
/
scan_log_calls.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
# Verify the log calls test is up-to-date
name: Log calls
on:
workflow_dispatch:
workflow_call:
permissions: {}
jobs:
log-calls:
name: Log calls
env:
WORKING_DIRECTORY: utils/call_stacks_analysis/
runs-on: ubuntu-latest
steps:
- name: Clone the git repo
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
- name: Generate log calls' diff
working-directory: ${{ env.WORKING_DIRECTORY }}
run: |
./log_call_all_generate.py
git diff > log_calls.diff
echo "length=$(cat log_calls.diff | wc -l)" >> $GITHUB_OUTPUT
id: log_calls_diff
- name: Non-empty diff
if: steps.log_calls_diff.outputs.length != '0'
run: cat ${{ env.WORKING_DIRECTORY }}/log_calls.diff
- name: Upload artifacts
if: steps.log_calls_diff.outputs.length != '0'
uses: actions/upload-artifact@50769540e7f4bd5e21e526ee35c689e35e0d6874 # v4.4.0
with:
name: log_calls_diff
path: ${{ env.WORKING_DIRECTORY }}/log_calls.diff
- name: Exit code
run: |
[ "${{steps.log_calls_diff.outputs.length}}" != '0' ] && exit 1
exit 0