Skip to content

Verify main-dev Tier 0 #22

Verify main-dev Tier 0

Verify main-dev Tier 0 #22

# Tier 0 harness for the main-dev lane after a successful dev deploy (#674).
#
# Chained mode: set the deploying workflow's top-level `name:` to "CD Deploy Dev"
# (see #673) so `workflow_run` matches exactly. You can also merge the job below
# into that workflow with `needs: deploy-dev` instead of using workflow_run.
name: Verify main-dev Tier 0
on:
workflow_dispatch:
workflow_run:
workflows:
- CD Deploy Dev
types:
- completed
concurrency:
group: verify-main-dev-tier0-${{ github.event_name == 'workflow_run' && github.event.workflow_run.head_sha || github.sha }}
cancel-in-progress: true
permissions:
contents: read
actions: write
jobs:
verify-dev-tier0:
name: verify-dev-tier0
runs-on: ubuntu-latest
environment: development
if: >-
github.event_name == 'workflow_dispatch' ||
(github.event_name == 'workflow_run' &&
github.event.workflow_run.conclusion == 'success' &&
github.event.workflow_run.head_repository.full_name == github.repository)
steps:
- name: Check out the repo
uses: actions/checkout@v6
with:
ref: ${{ github.event_name == 'workflow_run' && github.event.workflow_run.head_sha || github.sha }}
- name: Set up Node.js
uses: actions/setup-node@v6
with:
node-version-file: .nvmrc
cache: npm
- name: Install dependencies
run: npm ci
- name: Run Tier 0 harness (main-dev)
env:
HARNESS_MAIN_DEV_ENV: ${{ secrets.HARNESS_MAIN_DEV_ENV }}
run: |
set +x
if [ -z "${HARNESS_MAIN_DEV_ENV}" ]; then
echo "::error::HARNESS_MAIN_DEV_ENV is not set in the GitHub development environment"
exit 1
fi
printf '%s\n' "${HARNESS_MAIN_DEV_ENV}" > "${RUNNER_TEMP}/main-dev.env"
npm run verify:tier0 -- main-dev "${RUNNER_TEMP}/main-dev.env"
- name: Upload harness artifacts
if: always()
uses: actions/upload-artifact@v4
with:
name: harness-main-dev-tier0-${{ github.run_id }}
path: artifacts/release-validation/
if-no-files-found: ignore