Conversation
Split the ATOM test workflow into a reusable workflow_call entrypoint and a local trigger wrapper so other repos can invoke the same test pipeline.
There was a problem hiding this comment.
Pull request overview
This PR refactors the existing ATOM CI test pipeline into a reusable workflow_call workflow and introduces a lightweight trigger wrapper to preserve the current push / pull_request / schedule / workflow_dispatch entrypoints while enabling cross-repo reuse.
Changes:
- Converted
.github/workflows/atom-test.yamlinto a reusable workflow withworkflow_callinputs/secrets for checkout source, fork handling, model scope selection, pre-check gating, and dashboard publishing. - Added
.github/workflows/atom-test-trigger.yamlas the wrapper workflow that maps repository events to the reusable workflow inputs and secrets.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
| .github/workflows/atom-test.yaml | Reworked into a reusable workflow with parameterized checkout/source SHA, optional pre-check gating, and optional dashboard publishing. |
| .github/workflows/atom-test-trigger.yaml | New wrapper workflow that preserves existing triggers and calls the reusable workflow with computed inputs. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
.github/workflows/atom-test.yaml
Outdated
| GITHUB_SHA: ${{ github.sha }} | ||
| GITHUB_TOKEN: ${{ secrets.github_token || github.token }} | ||
| GITHUB_REPOSITORY: ${{ inputs.checkout_repository }} | ||
| GITHUB_SHA: ${{ env.GITHUB_COMMIT_SHA }} |
There was a problem hiding this comment.
Pre-checkin signal artifacts are published as checks-signal-${{ github.sha }} by pre-checks.yaml, i.e. keyed to the workflow run SHA (merge SHA for PRs). This job now sets GITHUB_SHA to env.GITHUB_COMMIT_SHA (which resolves to the PR head SHA via source_commit_sha), so check_signal.sh will look for a non-existent artifact on PRs and always time out. Use the checked-out ref/SHA (inputs.checkout_ref, which the trigger sets to github.sha) for the signal lookup, or introduce a dedicated signal_commit_sha input to avoid conflating the two SHAs.
| GITHUB_SHA: ${{ env.GITHUB_COMMIT_SHA }} | |
| GITHUB_SHA: ${{ inputs.checkout_ref }} |
| needs: [atom-test] | ||
| if: always() && github.ref == 'refs/heads/main' && (github.event_name == 'push' || github.event_name == 'schedule') | ||
| if: ${{ always() && inputs.publish_dashboard }} | ||
| runs-on: ubuntu-latest |
There was a problem hiding this comment.
publish_dashboard can cause this job to push to gh-pages, but accuracy-dashboard does not declare permissions: contents: write (and likely actions: read for artifact download). In reusable workflows, callers often set the default GITHUB_TOKEN permissions to read-only, which will make the dashboard publish fail even when publish_dashboard is true. Add an explicit permissions block on this job (or document/require the caller to grant these permissions) so reuse is reliable.
| runs-on: ubuntu-latest | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: write | |
| actions: read |
| GITHUB_REPO_URL: ${{ inputs.source_repo_url || format('https://github.com/{0}.git', inputs.checkout_repository) }} | ||
| GITHUB_COMMIT_SHA: ${{ inputs.source_commit_sha || inputs.checkout_ref }} | ||
| AITER_GIT_REF: ${{ inputs.aiter_branch }} |
There was a problem hiding this comment.
The new run_precheck / source_commit_sha inputs allow callers to enable the pre-checkin gate, but GITHUB_COMMIT_SHA currently falls back to inputs.checkout_ref (which may be a branch/ref string). Since the pre-checkin artifact naming is SHA-based (checks-signal-<sha>), enabling run_precheck with a non-SHA checkout_ref will deterministically fail after retries. Consider validating that the commit input is a full SHA (or resolve the checked-out ref to a SHA via git rev-parse) before running the signal download to fail fast with a clear error.
Resolve the reusable workflow conflict against the latest ATOM test changes and keep the new main-branch concurrency behavior in the trigger wrapper.
Summary
atom-test.yamlinto a reusableworkflow_callentrypoint plus a lightweight trigger wrapperpush/pull_request/schedule/workflow_dispatchentrypoints viaatom-test-trigger.yamlTest plan
ReadLints)ROCm/ATOM