-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathaction.yml
More file actions
109 lines (104 loc) · 3.78 KB
/
Copy pathaction.yml
File metadata and controls
109 lines (104 loc) · 3.78 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
name: "Entropy Loop Core"
description: >-
Compare a baseline and current regression report, write a local CI evidence
bundle, and optionally append a step summary. No GitHub API, no token.
branding:
icon: "check-circle"
color: "purple"
inputs:
baseline-report:
description: "Path to the baseline regression JSON report."
required: true
current-report:
description: "Path to the current regression JSON report."
required: true
fail-on:
description: "Failure policy: new-failures, any-failures, or never."
required: false
default: "new-failures"
evidence-dir:
description: "Directory to write the CI evidence bundle into."
required: false
default: "entropy-loop-evidence"
json-report:
description: "Extra path to also write the triage JSON."
required: false
default: "entropy-loop-evidence/triage.json"
markdown-report:
description: "Extra path to also write the triage Markdown."
required: false
default: "entropy-loop-evidence/triage.md"
junit-report:
description: "Optional path to write a JUnit XML report. Empty means none."
required: false
default: ""
html-report:
description: "Optional path to write a self-contained HTML report. Empty means none."
required: false
default: ""
html-locale:
description: "Locale for the optional HTML report. Supported values: en, ko."
required: false
default: "en"
write-step-summary:
description: "Append a summary to the GitHub Actions step summary."
required: false
default: "true"
install-package:
description: "Install entropy-loop-core from PyPI before running."
required: false
default: "true"
package-version:
description: "Specific entropy-loop-core version to install (optional)."
required: false
default: ""
python-command:
description: "Python command to use for install and run."
required: false
default: "python3"
runs:
using: "composite"
steps:
- name: Install entropy-loop-core
if: ${{ inputs.install-package == 'true' }}
shell: bash
run: |
PACKAGE_VERSION="${{ inputs.package-version }}"
PYTHON_COMMAND="${{ inputs.python-command }}"
# Reproducibility: with no explicit version, pin to the semver tag the
# Action is used at (GITHUB_ACTION_REF, e.g. v0.8.0). Branch refs such as
# main fall back to the latest published package. No GitHub API, no token.
if [ -n "$PACKAGE_VERSION" ]; then
PACKAGE_SPEC="entropy-loop-core==$PACKAGE_VERSION"
elif echo "${GITHUB_ACTION_REF:-}" | grep -Eq '^v[0-9]+\.[0-9]+\.[0-9]+$'; then
ACTION_VERSION="${GITHUB_ACTION_REF#v}"
PACKAGE_SPEC="entropy-loop-core==$ACTION_VERSION"
else
PACKAGE_SPEC="entropy-loop-core"
fi
"$PYTHON_COMMAND" -m pip install --upgrade pip
"$PYTHON_COMMAND" -m pip install "$PACKAGE_SPEC"
- name: Write Entropy Loop CI evidence
shell: bash
run: |
ARGS=(
"${{ inputs.baseline-report }}"
"${{ inputs.current-report }}"
--fail-on "${{ inputs.fail-on }}"
--evidence-dir "${{ inputs.evidence-dir }}"
--json-report "${{ inputs.json-report }}"
--markdown-report "${{ inputs.markdown-report }}"
)
if [ -n "${{ inputs.junit-report }}" ]; then
ARGS+=(--junit-report "${{ inputs.junit-report }}")
fi
if [ -n "${{ inputs.html-report }}" ]; then
ARGS+=(--html-report "${{ inputs.html-report }}")
ARGS+=(--html-locale "${{ inputs.html-locale }}")
fi
if [ "${{ inputs.write-step-summary }}" = "true" ]; then
ARGS+=(--append-github-step-summary)
else
ARGS+=(--no-step-summary)
fi
entropy-loop write-ci-evidence "${ARGS[@]}"