Skip to content
This repository was archived by the owner on Aug 21, 2025. It is now read-only.
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 24 additions & 2 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -59,11 +59,33 @@ runs:
fi
- shell: bash
run: pip install -r requirements_dev.txt
- shell: bash
run: |
if [ -f "requirements_ucc.txt" ]
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You are missing closing brackets for the if statement

Suggested change
if [ -f "requirements_ucc.txt" ]
if [ -f "requirements_ucc.txt" ] ;

then
echo "Found requirements_ucc.txt. Installing UCC dependencies in an isolated environment"
python3 -m venv .ucc_venv
./.ucc_venv/bin/python -m pip install -r requirements_ucc.txt

# if file does not exist, show an error
if [ ! -f "./.ucc_venv/bin/ucc-gen" ]
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
if [ ! -f "./.ucc_venv/bin/ucc-gen" ]
if [ ! -f "./.ucc_venv/bin/ucc-gen" ] ;

then
echo "ucc-gen not found, please check your requirements_ucc.txt file"
exit 1
fi
fi
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

WDYT about adding here an else condition with warning message to migrate ucc dependency to a separate file?

- run: |
if [ ! -z $INPUT_VERSION ]; then ARG_VERSION="--ta-version=${INPUT_VERSION}"; fi
echo "result=$(echo $ARG_VERSION)" >> $GITHUB_OUTPUT
echo running ucc-gen $ARG_VERSION
ucc-gen $ARG_VERSION

if [ -f "./.ucc_venv/bin/ucc-gen" ]
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
if [ -f "./.ucc_venv/bin/ucc-gen" ]
if [ -f "./.ucc_venv/bin/ucc-gen" ] ;

then
echo "running ucc-gen $UCC_VERSION in an isolated environment $ARG_VERSION"
./.ucc_venv/bin/ucc-gen $ARG_VERSION
else
echo "running ucc-gen $ARG_VERSION"
ucc-gen $ARG_VERSION
fi
shell: bash
env:
INPUT_VERSION: ${{ inputs.version }}
Expand Down