refactor(types): clear interfaceGenerator and classGenerator #570
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: Pipeline Parity (Develop) | |
| on: | |
| push: | |
| branches: [develop] | |
| paths: | |
| - 'src/**' | |
| - 'packages/**' | |
| - 'scripts/**' | |
| - '.github/workflows/**' | |
| workflow_dispatch: | |
| inputs: | |
| packages: | |
| description: 'Packages to test (comma-separated or "all")' | |
| required: false | |
| default: 'all' | |
| validator_version: | |
| description: 'HL7 Validator version' | |
| required: false | |
| default: 'latest' | |
| concurrency: | |
| group: parity-develop-${{ github.ref }} | |
| cancel-in-progress: false | |
| jobs: | |
| # ── Run both validators in parallel (reusable workflow) ──────────────────── | |
| parity-tests: | |
| uses: ./.github/workflows/_parity-tests.yml | |
| with: | |
| packages: ${{ github.event.inputs.packages || 'all' }} | |
| validator_version: ${{ github.event.inputs.validator_version || 'latest' }} | |
| # ── Deploy pre-release results to GitHub Pages (develop/) ──────────────────── | |
| deploy: | |
| needs: parity-tests | |
| if: always() && needs.parity-tests.result != 'skipped' | |
| runs-on: ubuntu-latest | |
| concurrency: | |
| group: gh-pages-deploy | |
| cancel-in-progress: false | |
| permissions: | |
| contents: write | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v7 | |
| with: | |
| ref: develop | |
| fetch-depth: 0 | |
| token: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v7 | |
| with: | |
| node-version: '22' | |
| cache: 'npm' | |
| - name: Install dependencies | |
| run: npm ci | |
| - name: Download Firely reports | |
| uses: actions/download-artifact@v8 | |
| with: | |
| name: firely-reports | |
| path: develop-reports/firely | |
| continue-on-error: true | |
| - name: Download HL7 reports | |
| uses: actions/download-artifact@v8 | |
| with: | |
| name: hl7-reports | |
| path: develop-reports/hl7 | |
| continue-on-error: true | |
| - name: Download internal reports | |
| uses: actions/download-artifact@v8 | |
| with: | |
| name: internal-reports | |
| path: develop-reports/internal | |
| continue-on-error: true | |
| - name: Prepare deploy directory | |
| run: | | |
| DEPLOY_DIR=$(mktemp -d) | |
| echo "DEPLOY_DIR=$DEPLOY_DIR" >> $GITHUB_ENV | |
| # Checkout existing gh-pages content | |
| git fetch origin gh-pages:gh-pages 2>/dev/null || true | |
| if git show-ref --verify --quiet refs/heads/gh-pages; then | |
| git worktree add "$DEPLOY_DIR" gh-pages | |
| else | |
| git worktree add --orphan "$DEPLOY_DIR" gh-pages 2>/dev/null || { | |
| git worktree add "$DEPLOY_DIR" --detach | |
| git -C "$DEPLOY_DIR" checkout --orphan gh-pages | |
| git -C "$DEPLOY_DIR" rm -rf . 2>/dev/null || true | |
| } | |
| fi | |
| # Create develop subdirectory (preserve main results at root) | |
| mkdir -p "$DEPLOY_DIR/develop/badges" | |
| - name: Clear stale pre-release data | |
| run: | | |
| # Remove old prerelease data so failed runs don't show stale results | |
| rm -f "$DEPLOY_DIR"/parity-data-prerelease.json | |
| rm -f "$DEPLOY_DIR"/parity-data-hl7-prerelease.json | |
| rm -f "$DEPLOY_DIR"/parity-data-internal-prerelease.json | |
| rm -f "$DEPLOY_DIR"/develop/parity-data.json | |
| rm -f "$DEPLOY_DIR"/develop/parity-data-hl7.json | |
| rm -f "$DEPLOY_DIR"/develop/parity-data-internal.json | |
| rm -f "$DEPLOY_DIR"/develop/SUMMARY-*.md | |
| rm -f "$DEPLOY_DIR"/develop/*-DETAIL*.md | |
| - name: Copy pre-release data to gh-pages root and develop/ | |
| run: | | |
| # Copy Firely pre-release data | |
| if [ -d "develop-reports/firely" ]; then | |
| # Root-level pre-release data (for unified index.html) | |
| cp develop-reports/firely/parity-data.json "$DEPLOY_DIR/parity-data-prerelease.json" 2>/dev/null || true | |
| # develop/ subdirectory copies | |
| cp develop-reports/firely/parity-data.json "$DEPLOY_DIR/develop/" 2>/dev/null || true | |
| cp develop-reports/firely/badge-*.json "$DEPLOY_DIR/develop/badges/" 2>/dev/null || true | |
| cp develop-reports/firely/*-DETAIL-firely.md "$DEPLOY_DIR/develop/" 2>/dev/null || true | |
| cp develop-reports/firely/SUMMARY.md "$DEPLOY_DIR/develop/SUMMARY-firely.md" 2>/dev/null || true | |
| fi | |
| # Copy HL7 pre-release data | |
| if [ -d "develop-reports/hl7" ]; then | |
| # Root-level pre-release data (for unified index.html) | |
| cp develop-reports/hl7/parity-data-hl7.json "$DEPLOY_DIR/parity-data-hl7-prerelease.json" 2>/dev/null || true | |
| # develop/ subdirectory copies | |
| cp develop-reports/hl7/parity-data-hl7.json "$DEPLOY_DIR/develop/" 2>/dev/null || true | |
| cp develop-reports/hl7/badge-hl7-*.json "$DEPLOY_DIR/develop/badges/" 2>/dev/null || true | |
| cp develop-reports/hl7/*-DETAIL-hl7.md "$DEPLOY_DIR/develop/" 2>/dev/null || true | |
| cp develop-reports/hl7/SUMMARY.md "$DEPLOY_DIR/develop/SUMMARY-hl7.md" 2>/dev/null || true | |
| fi | |
| # Copy internal pre-release data | |
| if [ -d "develop-reports/internal" ]; then | |
| # Root-level pre-release data (for unified index.html) | |
| cp develop-reports/internal/parity-data-internal.json "$DEPLOY_DIR/parity-data-internal-prerelease.json" 2>/dev/null || true | |
| # develop/ subdirectory copies | |
| cp develop-reports/internal/parity-data-internal.json "$DEPLOY_DIR/develop/" 2>/dev/null || true | |
| cp develop-reports/internal/badge-internal-*.json "$DEPLOY_DIR/develop/badges/" 2>/dev/null || true | |
| cp develop-reports/internal/*-DETAIL-internal.md "$DEPLOY_DIR/develop/" 2>/dev/null || true | |
| cp develop-reports/internal/SUMMARY.md "$DEPLOY_DIR/develop/SUMMARY-internal.md" 2>/dev/null || true | |
| fi | |
| - name: Patch pre-release version from latest dev tag | |
| run: | | |
| git fetch --tags origin | |
| # Find latest dev pre-release tag (e.g., v1.1.5-dev.20260327194307.5d601fd) | |
| LATEST_DEV_TAG=$(git tag --sort=-v:refname --list 'v*-dev.*' | head -1) | |
| if [ -n "$LATEST_DEV_TAG" ]; then | |
| VERSION="${LATEST_DEV_TAG#v}" | |
| for f in "$DEPLOY_DIR"/parity-data-prerelease.json "$DEPLOY_DIR"/develop/parity-data.json "$DEPLOY_DIR"/parity-data-hl7-prerelease.json "$DEPLOY_DIR"/develop/parity-data-hl7.json "$DEPLOY_DIR"/parity-data-internal-prerelease.json "$DEPLOY_DIR"/develop/parity-data-internal.json; do | |
| if [ -f "$f" ]; then | |
| jq --arg v "$VERSION" '.babelfhirVersion = $v' "$f" > "${f}.tmp" && mv "${f}.tmp" "$f" | |
| fi | |
| done | |
| echo "Patched pre-release version to $LATEST_DEV_TAG" | |
| else | |
| echo "No dev tag found — using version from parity data" | |
| fi | |
| - name: Regenerate unified report page | |
| run: | | |
| # Append current pre-release results to trend history | |
| node scripts/update-history.js "$DEPLOY_DIR" | |
| # Regenerate root index.html with both stable + pre-release data | |
| node scripts/generate-report-page.js "$DEPLOY_DIR" "$DEPLOY_DIR" | |
| node scripts/generate-report-downloads.js "$DEPLOY_DIR" | |
| - name: Ensure .nojekyll exists | |
| run: touch "$DEPLOY_DIR/.nojekyll" | |
| - name: Commit and push to gh-pages | |
| run: | | |
| cd "$DEPLOY_DIR" | |
| git config user.email "github-actions[bot]@users.noreply.github.com" | |
| git config user.name "github-actions[bot]" | |
| git add -A | |
| if git diff --cached --quiet; then | |
| echo "No changes to deploy" | |
| else | |
| git commit -m "Update pre-release parity report (develop) [skip ci]" | |
| git push origin gh-pages | |
| echo "Deployed pre-release results to GitHub Pages /develop/" | |
| fi | |
| - name: Cleanup worktree | |
| if: always() | |
| run: | | |
| cd "${{ github.workspace }}" | |
| git worktree remove "$DEPLOY_DIR" --force 2>/dev/null || true |