Skip to content

PR Checks

PR Checks #68

Workflow file for this run

name: PR Checks
on:
workflow_dispatch:
pull_request:
permissions:
contents: read
issues: write
pull-requests: read
jobs:
check:
runs-on: ubuntu-latest
env:
WAZA_VERSION: v0.31.0
steps:
- name: Check out repository
uses: actions/checkout@v6
- name: Set up Python
uses: actions/setup-python@v6
with:
python-version: "3.12"
- name: Install vendir
run: |
mkdir -p .tools
curl -fsSL https://carvel.dev/install.sh | K14SIO_INSTALL_BIN_DIR="$PWD/.tools" bash
echo "$PWD/.tools" >> "$GITHUB_PATH"
- name: Install Waza CI checker
run: |
mkdir -p .tools
curl -fsSL -o .tools/waza-linux-amd64 "https://github.com/microsoft/waza/releases/download/${WAZA_VERSION}/waza-linux-amd64"
curl -fsSL -o .tools/waza-checksums.txt "https://github.com/microsoft/waza/releases/download/${WAZA_VERSION}/checksums.txt"
(cd .tools && grep 'waza-linux-amd64' waza-checksums.txt | sha256sum -c --status)
mv .tools/waza-linux-amd64 .tools/waza
chmod +x .tools/waza
echo "$PWD/.tools" >> "$GITHUB_PATH"
- name: Validate automation scripts
run: python3 -m py_compile scripts/generate_catalog.py scripts/generate_catalog_definitions.py scripts/generate_agent_catalog.py scripts/generate_release_notes.py scripts/import_external_catalog_sources.py scripts/upstream_watch.py scripts/waza_skill_quality.py scripts/waza_github_issue.py
- name: Run automation regression tests
run: python3 -m unittest discover -s scripts/tests -p 'test_*.py'
- name: Validate external catalog source config
run: python3 scripts/import_external_catalog_sources.py --validate-config
- name: Sync and normalize external sources
run: bash scripts/sync_external_catalog_sources.sh
- name: Verify imported external sources are committed
run: git diff --exit-code -- catalog external-sources
- name: Validate catalog source metadata
run: |
python3 scripts/generate_catalog.py --validate-only
python3 scripts/generate_agent_catalog.py --validate-only
- name: Run Waza skill quality report
run: python3 scripts/waza_skill_quality.py
- name: Validate upstream watch config
run: python3 scripts/upstream_watch.py --validate-config
- name: Upload Waza skill quality report
if: always()
uses: actions/upload-artifact@v4
with:
name: waza-skill-quality
path: artifacts/waza-skill-quality/
- name: Create or update Waza skill quality issue
if: always() && (github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name == github.repository)
env:
GH_TOKEN: ${{ github.token }}
run: python3 scripts/waza_github_issue.py
- name: Validate upstream watch JSON
run: |
python3 - <<'PY'
import json
from pathlib import Path
json.loads(Path('.github/upstream-watch.json').read_text())
json.loads(Path('.github/upstream-watch-state.json').read_text())
print('watch json ok')
PY
tool-smoke:
runs-on: ubuntu-latest
steps:
- name: Check out repository
uses: actions/checkout@v6
- name: Set up .NET
uses: actions/setup-dotnet@v5
with:
dotnet-version: "10.0.x"
- name: Build dotnet tool
run: dotnet build dotnet-skills.slnx -c Release
- name: Run dotnet tests
run: dotnet test dotnet-skills.slnx -c Release --no-build
- name: Pack dotnet tool
run: dotnet pack dotnet-skills.slnx -c Release --no-build
- name: Smoke test installable tool
run: bash scripts/smoke_test_tool.sh artifacts/nuget