Skip to content

[codex] Fix packed export validation in CI #1321

[codex] Fix packed export validation in CI

[codex] Fix packed export validation in CI #1321

Workflow file for this run

name: Pull Request Validation
on:
pull_request:
branches: [main]
# Cancel in-progress runs when new commits are pushed
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number }}
cancel-in-progress: true
env:
FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: 'true'
permissions:
contents: write # Needed for auto-generating and committing changesets
pull-requests: write
packages: read
jobs:
validate-commits:
name: Validate Conventional Commits
runs-on: arc-happyvertical
steps:
- name: Checkout PR branch
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Validate commit messages
uses: wagoid/commitlint-github-action@v6
with:
configFile: .commitlintrc.json
validate-workflows:
name: Validate Workflow Files
runs-on: arc-happyvertical
steps:
- name: Checkout PR branch
uses: actions/checkout@v4
- name: Get changed workflow files
id: changed-files
uses: tj-actions/changed-files@v45
with:
files: .github/workflows/*.{yml,yaml}
- name: Validate workflow syntax
if: steps.changed-files.outputs.any_changed == 'true'
run: |
echo "🔍 Validating workflow files..."
files="${{ steps.changed-files.outputs.all_changed_files }}"
echo "Changed files: $files"
# Check if yamllint is available (custom ARC runner image)
if command -v yamllint &> /dev/null; then
echo "✓ yamllint already installed"
elif command -v pip &> /dev/null; then
echo "Installing yamllint..."
pip install yamllint
elif command -v pip3 &> /dev/null; then
echo "Installing yamllint via pip3..."
pip3 install yamllint
else
echo "⚠️ No pip available, skipping yamllint validation"
exit 0
fi
# Validate each changed workflow file
for file in ${{ steps.changed-files.outputs.all_changed_files }}; do
echo " Checking $file..."
yamllint "$file" || exit 1
done
echo "✅ YAML syntax validation passed"
- name: Validate with actionlint
if: steps.changed-files.outputs.any_changed == 'true'
run: |
# Check if actionlint is available (custom ARC runner image)
if ! command -v actionlint &> /dev/null; then
echo "Installing actionlint..."
bash <(curl -s \
https://raw.githubusercontent.com/rhysd/actionlint/main/scripts/download-actionlint.bash)
sudo mv actionlint /usr/local/bin/
else
echo "✓ actionlint $(actionlint -version) already installed"
fi
echo "🔍 Running actionlint on changed workflows..."
for file in ${{ steps.changed-files.outputs.all_changed_files }}; do
echo " Checking $file with actionlint..."
actionlint "$file" || exit 1
done
echo "✅ actionlint validation passed"
- name: Workflow validation summary
if: steps.changed-files.outputs.any_changed == 'true'
run: |
echo "✅ All workflow validations passed:"
echo " - YAML syntax validated with yamllint"
echo " - Workflow errors checked with actionlint"
echo " - Shellcheck warnings validated"
check-sdk-versions:
name: Check SDK Version Alignment
runs-on: arc-happyvertical
steps:
- name: Checkout PR branch
uses: actions/checkout@v4
- name: Verify SDK packages use same version
run: bash scripts/check-sdk-versions.sh
test:
name: Validate Changes
uses: ./.github/workflows/test-suite.yml
permissions:
contents: read
packages: read
publish-dry-run:
name: Publish Dry Run
uses: ./.github/workflows/publish-dry-run.yml
permissions:
contents: read
packages: read