feat(hooks): HooksManager orchestration and HooksParser validation (3/7) #2058
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: Pull Request | |
| on: | |
| pull_request: | |
| types: [opened, reopened, synchronize] | |
| branches: [ main ] | |
| permissions: | |
| contents: read | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| get-configs: | |
| uses: ./.github/workflows/configs.yml | |
| pr-build-test-nodejs: | |
| needs: [ get-configs ] | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| os: [ ubuntu-latest, macos-latest, windows-latest ] | |
| runs-on: ${{ matrix.os }} | |
| permissions: | |
| contents: read | |
| pull-requests: write | |
| code-quality: write | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - name: Setup Node.js ${{ needs.get-configs.outputs.node-version }} | |
| uses: actions/setup-node@v6 | |
| with: | |
| node-version: ${{ needs.get-configs.outputs.node-version }} | |
| cache: 'npm' | |
| - name: Install Dependencies | |
| run: npm ci | |
| - name: Build | |
| run: npm run build | |
| - name: Code Quality | |
| run: npm run lint && npm run check:duplicates | |
| - name: Test | |
| run: npm run test | |
| - name: Upload coverage report | |
| if: matrix.os == 'ubuntu-latest' | |
| uses: actions/upload-code-coverage@v1 | |
| with: | |
| file: coverage/cobertura-coverage.xml | |
| language: TypeScript | |
| label: code-coverage/vitest | |
| pr-build-test-go: | |
| needs: [ get-configs ] | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| os: [ ubuntu-latest, macos-latest, windows-latest ] | |
| runs-on: ${{ matrix.os }} | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - name: Setup Go ${{ needs.get-configs.outputs.go-version }} | |
| uses: actions/setup-go@v6 | |
| with: | |
| go-version: ${{ needs.get-configs.outputs.go-version }} | |
| cache-dependency-path: cfn-init/go.sum | |
| - name: Build | |
| shell: bash | |
| run: GOPROXY=direct go build -C ./cfn-init ./... | |
| - name: Test | |
| shell: bash | |
| run: GOPROXY=direct go test -C ./cfn-init -v -cover ./... | |
| detect-changes: | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: read | |
| pull-requests: read | |
| outputs: | |
| release-manifest: ${{ steps.filter.outputs.release-manifest }} | |
| feature-flags: ${{ steps.filter.outputs.feature-flags }} | |
| steps: | |
| - name: Detect changed paths | |
| id: filter | |
| uses: dorny/paths-filter@v4 | |
| with: | |
| filters: | | |
| release-manifest: | |
| - 'assets/release-manifest.json' | |
| feature-flags: | |
| - 'assets/featureFlag/*.json' | |
| validate-release-manifest-file: | |
| needs: [ detect-changes ] | |
| if: needs.detect-changes.outputs.release-manifest == 'true' | |
| uses: ./.github/workflows/validate-release-manifest.yml | |
| validate-feature-flag-files: | |
| needs: [ detect-changes ] | |
| if: needs.detect-changes.outputs.feature-flags == 'true' | |
| uses: ./.github/workflows/validate-feature-flags.yml | |
| # Single always-running gate for file changes | |
| # The validate file jobs are conditional and report "skipped" on PRs that | |
| # don't touch their paths; a skipped job used directly as a required check | |
| # would leave the PR pending forever. This job runs unconditionally and only | |
| # fails if an upstream job actually failed or was cancelled (skipped is OK). | |
| file-change-checks: | |
| needs: [ detect-changes, validate-release-manifest-file, validate-feature-flag-files ] | |
| if: always() | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Verify no required check failed | |
| env: | |
| RESULTS: ${{ join(needs.*.result, ' ') }} | |
| run: | | |
| echo "Upstream job results: $RESULTS" | |
| for result in $RESULTS; do | |
| if [[ "$result" == "failure" || "$result" == "cancelled" ]]; then | |
| echo "::error::A required PR check did not pass (result: $result)" | |
| exit 1 | |
| fi | |
| done | |
| echo "All file change checks passed or were skipped as expected." |