Skip to content

Commit a3971ee

Browse files
fix: update condition checks in action.yml for better error handling and clarity; remove outdated update_badges.py script
1 parent 5917aba commit a3971ee

File tree

2 files changed

+5
-226
lines changed

2 files changed

+5
-226
lines changed

action.yml

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ runs:
6363
if: inputs.requirements-file != '' && steps.setup-python.outcome == 'success'
6464
run: |
6565
echo "::notice file=action.yml,line=60::Installing additional requirements from ${{ inputs.requirements-file }}"
66-
if [[ test -f "${{ inputs.requirements-file }}" ]]; then
66+
if [ test -r "${{ inputs.requirements-file }}" ]; then
6767
pip3 install -r "${{ inputs.requirements-file }}" 2>&1 | tee requirements_output.txt && echo "::notice file=action.yml,line=61::Additional requirements installation completed." || { echo "::error file=action.yml,line=62::Additional requirements installation failed."; exit 1; }
6868
else
6969
echo "::warning file=action.yml,line=63::Requirements file not found: ${{ inputs.requirements-file }}"
@@ -246,7 +246,7 @@ runs:
246246
id: run-mypy
247247
if: steps.install-linting-tools.outcome == 'success' && always()
248248
run: |
249-
if [ -z "${{ inputs.mypy_options }}" ]; then
249+
if [[ -z "${{ inputs.mypy_options }}" ]]; then
250250
echo "::notice file=action.yml,line=105::No MyPy options provided, using default."
251251
mypy . 2>&1 | tee mypy_output.txt
252252
else
@@ -306,10 +306,9 @@ runs:
306306
- name: Generate SVG Badges
307307
id: generate-badges
308308
if: steps.install-linting-tools.outcome == 'success' && always()
309-
run: |
310-
echo "::notice file=action.yml,line=167::Creating badges directory ${{ inputs.badge-directory }}/ if it does not exist."
311-
if [[ test -d "${{ inputs.badge-directory }}" ]]; then
312-
echo "::notice file=action.yml,line=170::Badge directory already exists."
309+
run: |
310+
if [ test -d "${{ inputs.badge-directory }}" ]; then
311+
echo "::notice file=action.yml,line=170::Badge directory exists: ${{ inputs.badge-directory }}"
313312
else
314313
echo "::notice file=action.yml,line=172::Badge directory does not exist. Creating it now."
315314
mkdir -p "${{ inputs.badge-directory }}" && echo "::notice file=action.yml,line=174::Badge directory created successfully." || { echo "::error file=action.yml,line=175::Failed to create badge directory."; exit 1; }

update_badges.py

Lines changed: 0 additions & 220 deletions
This file was deleted.

0 commit comments

Comments
 (0)