GHA-174 Add releasability check to automated release workflow #24
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Test Check Releasability Status Action | |
| on: | |
| workflow_call: | |
| pull_request: | |
| paths: | |
| - 'check-releasability-status/**' | |
| - '.github/workflows/test-check-releasability-status.yml' | |
| push: | |
| branches: | |
| - branch-* | |
| paths: | |
| - 'check-releasability-status/**' | |
| - '.github/workflows/test-check-releasability-status.yml' | |
| workflow_dispatch: | |
| jobs: | |
| integration-tests: | |
| name: Run Integration Tests | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Test Action with Real Repository Context | |
| run: | | |
| echo "Testing with real repository context..." | |
| echo "Repository: ${{ github.repository }}" | |
| echo "Branch: master" | |
| # The action may succeed or fail depending on whether Releasability status exists | |
| # We're primarily testing that the action runs without syntax errors | |
| if [ "${{ steps.test-action.outcome }}" = "success" ]; then | |
| echo "✓ Action executed successfully - Releasability status is success" | |
| else | |
| echo "✓ Action failed as expected (likely no Releasability status exists or not success)" | |
| echo "This is normal for test repositories that don't have the expected status context" | |
| fi | |
| validation-tests: | |
| name: Test Input Validation | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Test Without GitHub Token | |
| id: test-no-token | |
| uses: ./check-releasability-status | |
| with: | |
| github-token: "" | |
| continue-on-error: true | |
| - name: Verify No Token Failure | |
| if: steps.test-no-token.outcome == 'success' | |
| run: | | |
| echo "✗ Action should have failed when no GitHub token is provided" | |
| exit 1 | |
| - name: Confirm No Token Failure | |
| if: steps.test-no-token.outcome == 'failure' | |
| run: | | |
| echo "✓ Action correctly failed when no GitHub token is provided" | |
| - name: Test Default Token Usage | |
| id: test-default-token | |
| uses: ./check-releasability-status | |
| continue-on-error: true | |
| - name: Verify Default Token Behavior | |
| run: | | |
| echo "Default token test completed" | |
| echo "Outcome: ${{ steps.test-default-token.outcome }}" | |
| echo "✓ Action uses default github.token when no token is explicitly provided" | |
| - name: Summary of Validation Tests | |
| run: | | |
| echo "================================" | |
| echo "Validation Test Results Summary:" | |
| echo "================================" | |
| echo "✓ Missing token validation: ${{ steps.test-no-token.outcome == 'failure' && 'PASS' || 'FAIL' }}" | |
| echo "✓ Default token usage: TESTED" | |
| echo "================================" |