Skip to content

Commit 15a3725

Browse files
committed
ci: collapse internal parity from 28 parallel jobs to single sequential job
Internal validator is pure Node.js — no .NET or Java needed. Running all 28 IGs in one job eliminates per-job overhead (runner startup, checkout, npm ci, cache restore, zod-r4 build) and shares the FHIR package cache across all IGs. Also removes the now-unnecessary merge-internal job.
1 parent 76fb36c commit 15a3725

1 file changed

Lines changed: 18 additions & 54 deletions

File tree

.github/workflows/_parity-tests.yml

Lines changed: 18 additions & 54 deletions
Original file line numberDiff line numberDiff line change
@@ -369,16 +369,11 @@ jobs:
369369
merged-output/hl7/badge-hl7-*.json
370370
retention-days: 30
371371

372-
# ── Internal (validate) — one job per IG ────────────────────────────
372+
# ── Internal (validate) — single job, all IGs sequentially ──────────
373373
internal:
374-
needs: setup
375374
runs-on: ubuntu-latest
376375
permissions:
377376
contents: read
378-
strategy:
379-
fail-fast: false
380-
matrix:
381-
package: ${{ fromJson(needs.setup.outputs.matrix) }}
382377

383378
steps:
384379
- name: Checkout code
@@ -397,7 +392,7 @@ jobs:
397392
uses: actions/cache@v4
398393
with:
399394
path: .cache/.fhir/packages
400-
key: fhir-packages-${{ matrix.package }}-${{ hashFiles('src/test/pipelineParity.test.ts', 'src/generator/**/*.ts', 'src/generator/fhir/**/*.json') }}-v8
395+
key: fhir-packages-all-${{ hashFiles('src/test/pipelineParity.test.ts', 'src/generator/**/*.ts', 'src/generator/fhir/**/*.json') }}-v8
401396

402397
- name: Cache tx-server ValueSet expansions
403398
uses: actions/cache@v4
@@ -428,69 +423,38 @@ jobs:
428423
find .cache/.fhir/packages -type d -name "generated" -exec rm -rf {} + 2>/dev/null || true
429424
fi
430425
431-
- name: Run internal parity test (${{ matrix.package }})
426+
- name: Run internal parity tests (all packages)
432427
id: internal-test
433428
run: npm run test:parity
434429
env:
435430
CI: true
436-
PIPELINE_PACKAGES: ${{ matrix.package }}
431+
PIPELINE_PACKAGES: ${{ inputs.packages }}
437432
FHIR_VALIDATOR: internal
438433
continue-on-error: true
439434

440-
- name: Upload per-IG internal report
435+
- name: Generate internal badges
436+
if: always()
437+
run: |
438+
if [ -f "test/pipeline-parity-report/SUMMARY.md" ]; then
439+
node scripts/generate-badges.js test/pipeline-parity-report/SUMMARY.md test/pipeline-parity-report --validator=internal
440+
fi
441+
442+
- name: Upload internal reports
441443
if: always()
442444
uses: actions/upload-artifact@v4
443445
with:
444-
name: internal-report-${{ matrix.package }}
446+
name: internal-reports
445447
path: |
446448
test/pipeline-parity-report/SUMMARY.md
447449
test/pipeline-parity-report/*-DETAIL.md
448-
test/pipeline-parity-report/${{ matrix.package }}-*.json
449-
test/pipeline-parity-report/${{ matrix.package }}-*.txt
450+
test/pipeline-parity-report/*-*.json
451+
test/pipeline-parity-report/*-*.txt
452+
test/pipeline-parity-report/parity-data-internal.json
453+
test/pipeline-parity-report/badge-internal-*.json
450454
retention-days: 30
451455

452456
- name: Fail if test failed
453457
if: steps.internal-test.outcome == 'failure'
454458
run: |
455-
echo "::error::Internal parity test failed for ${{ matrix.package }}"
459+
echo "::error::Internal parity tests failed"
456460
exit 1
457-
458-
# ── Merge Internal reports ─────────────────────────────────────────────────
459-
merge-internal:
460-
needs: [setup, internal]
461-
if: always()
462-
runs-on: ubuntu-latest
463-
steps:
464-
- uses: actions/checkout@v4
465-
- uses: actions/setup-node@v4
466-
with:
467-
node-version: '22'
468-
- name: Install dependencies
469-
run: npm ci || (npm cache clean --force && npm ci)
470-
471-
- name: Download all internal per-IG reports
472-
uses: actions/download-artifact@v4
473-
with:
474-
pattern: internal-report-*
475-
path: merged-input/internal
476-
merge-multiple: false
477-
478-
- name: Merge internal reports
479-
run: node scripts/merge-parity-reports.js merged-input/internal merged-output/internal
480-
481-
- name: Generate internal badges
482-
run: |
483-
if [ -f "merged-output/internal/SUMMARY.md" ]; then
484-
node scripts/generate-badges.js merged-output/internal/SUMMARY.md merged-output/internal --validator=internal
485-
fi
486-
487-
- name: Upload merged internal reports
488-
uses: actions/upload-artifact@v4
489-
with:
490-
name: internal-reports
491-
path: |
492-
merged-output/internal/SUMMARY.md
493-
merged-output/internal/*-DETAIL.md
494-
merged-output/internal/parity-data-internal.json
495-
merged-output/internal/badge-internal-*.json
496-
retention-days: 30

0 commit comments

Comments
 (0)