feat(workflow): add validate-agent skill #46
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: UAT artifact validation | |
| on: | |
| pull_request: | |
| branches: [ main ] | |
| push: | |
| branches: [ main ] | |
| jobs: | |
| uat-validate: | |
| name: UAT artifact validation | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 10 | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 # Need full history to detect changed files | |
| - name: Check if UAT files changed | |
| id: filter | |
| run: | | |
| if [ "${{ github.event_name }}" == "pull_request" ]; then | |
| BASE_SHA="${{ github.event.pull_request.base.sha }}" | |
| HEAD_SHA="${{ github.event.pull_request.head.sha }}" | |
| else | |
| # For push events, compare with parent commit | |
| BASE_SHA="${{ github.event.before }}" | |
| HEAD_SHA="${{ github.sha }}" | |
| fi | |
| # Check if any UAT-related files changed | |
| CHANGED_FILES=$(git diff --name-only "$BASE_SHA" "$HEAD_SHA" | grep -E '^(scripts/uat-|tests/shell/)' || true) | |
| if [ -z "$CHANGED_FILES" ]; then | |
| echo "changed=false" >> $GITHUB_OUTPUT | |
| echo "No UAT-related files changed, skipping validation tests" | |
| else | |
| echo "changed=true" >> $GITHUB_OUTPUT | |
| echo "UAT files changed, running validation tests" | |
| fi | |
| - name: Ensure tests are executable | |
| if: steps.filter.outputs.changed == 'true' | |
| run: chmod +x tests/shell/uat_validate_test.sh | |
| - name: Run UAT validation tests | |
| if: steps.filter.outputs.changed == 'true' | |
| run: ./tests/shell/uat_validate_test.sh | |
| - name: Skip validation (no files changed) | |
| if: steps.filter.outputs.changed == 'false' | |
| run: echo "✅ No UAT files changed, validation skipped" |