-
Notifications
You must be signed in to change notification settings - Fork 1
/
action.yml
80 lines (71 loc) · 2.16 KB
/
action.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
name: 'Compare with baseline'
description: 'Analyze the results of the interoperability test suite'
inputs:
baseline:
description: 'The id of the baseline implementation'
required: true
target:
description: 'The id of the target implementation'
required: true
results:
description: 'Path to the test results'
required: true
default: 'test-suite-results.json'
output:
description: 'Path to the output'
required: true
default: 'baseline_comparison.json'
summarize:
description: 'Whether to produce a small summary for the job'
required: true
default: 'true'
fail-on-regression:
description: 'Whether to fail if a regression was found'
required: true
default: 'true'
upload:
description: 'Whether to upload the comparison results as an artifact'
required: true
default: 'true'
runs:
using: "composite"
steps:
- name: Checkout repo
uses: actions/checkout@v4
with:
repository: ProtonMail/openpgp-interop-test-analyzer
ref: 'main'
path: analyzer
- name: Set up python
uses: actions/setup-python@v5
with:
python-version: '3.10'
- name: Show files
run: ls -la .
shell: bash
- name: Compare with baseline
run: cat $RESULTS | python analyzer/compare_with_baseline.py $BASELINE $TARGET > $OUTPUT
shell: bash
env:
RESULTS: ${{ inputs.results }}
BASELINE: ${{ inputs.baseline }}
TARGET: ${{ inputs.target }}
OUTPUT: ${{ inputs.output }}
- if: ${{ inputs.upload == 'true' }}
name: Upload comparison with main
uses: actions/upload-artifact@v4
with:
name: ${{ inputs.output }}
path: ${{ inputs.output }}
- if: ${{ inputs.summarize == 'true' }}
name: Summarize test results
run: cat $OUTPUT | python analyzer/summarize.py >> $GITHUB_STEP_SUMMARY
shell: bash
env:
OUTPUT: ${{ inputs.output }}
- if: ${{ inputs.fail-on-regression == 'true' }}
name: "Fail action on regression"
run: cat $OUTPUT | python analyzer/pass_or_fail.py
shell: bash
env:
OUTPUT: ${{ inputs.output }}