Skip to content
Prev Previous commit
Next Next commit
test: add test case to validate action input edge cases
  • Loading branch information
kishaningithub committed Nov 27, 2025
commit 2135c4bc52cc04d7a008c3fc960f493c3ea294ab
31 changes: 30 additions & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -151,4 +151,33 @@ jobs:
python3 --version
python --version

python3 --version 2>&1 | grep -F "3.13"
python3 --version 2>&1 | grep -F "3.13"

test_invalid_action_input:
runs-on: ubuntu-latest
container: amazonlinux:2023
steps:
- name: Setup runner
run: |
yum install -y git sudo tar gzip which

- name: Checkout
run: |
git clone --depth 1 -b "${GITHUB_HEAD_REF:-$GITHUB_REF_NAME}" "https://github.com/${GITHUB_REPOSITORY}.git" .

- name: Install python
id: test-installation
continue-on-error: true
uses: ./

- name: Test python version
shell: bash
run: |
set -x

if [[ "${{ steps.test-installation.outcome }}" == "success" ]]; then
echo "error: The action should have failed because both python-version and python-version-file were not given"
exit 1
else
echo "success: The action successfully failed because both python-version and python-version-file were not given"
fi
Loading