feat: enhance OpenAPI tool loading with base URL resolution and impro… #239
Workflow file for this run
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: CI | |
| on: push | |
| permissions: | |
| actions: read | |
| contents: read | |
| concurrency: | |
| group: enclave-ci-${{ github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| build: | |
| name: Build | |
| runs-on: ubuntu-latest | |
| env: | |
| NX_DAEMON: "false" | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| - name: Setup Node | |
| uses: actions/setup-node@v6 | |
| with: | |
| node-version-file: ".nvmrc" | |
| cache: "yarn" | |
| - name: Install dependencies | |
| run: yarn install --frozen-lockfile | |
| - name: Set Nx SHAs | |
| uses: nrwl/nx-set-shas@v4 | |
| - name: Run linter | |
| run: npx nx affected -t lint | |
| continue-on-error: true | |
| - name: Run prettier | |
| run: npx prettier --check . | |
| continue-on-error: true | |
| - name: Build libraries | |
| id: build | |
| run: npx nx affected -t build | |
| continue-on-error: true | |
| - name: Retry build with cache reset | |
| if: steps.build.outcome == 'failure' | |
| run: | | |
| echo "Build failed, resetting NX cache and retrying..." | |
| npx nx reset | |
| npx nx affected -t build --skip-nx-cache | |
| - name: Cache build artifacts | |
| uses: actions/cache/save@v4 | |
| with: | |
| path: | | |
| node_modules | |
| libs/*/dist | |
| key: build-${{ github.sha }} | |
| test: | |
| name: Test | |
| runs-on: ubuntu-latest | |
| needs: build | |
| env: | |
| NX_DAEMON: "false" | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| - name: Setup Node | |
| uses: actions/setup-node@v6 | |
| with: | |
| node-version-file: ".nvmrc" | |
| cache: "yarn" | |
| - name: Restore build artifacts | |
| uses: actions/cache/restore@v4 | |
| with: | |
| path: | | |
| node_modules | |
| libs/*/dist | |
| key: build-${{ github.sha }} | |
| - name: Install dependencies | |
| run: yarn install --frozen-lockfile | |
| - name: Set Nx SHAs | |
| uses: nrwl/nx-set-shas@v4 | |
| - name: Test libraries | |
| id: test | |
| run: npx nx affected -t test --passWithNoTests 2>&1 | tee test-output.txt | |
| continue-on-error: true | |
| - name: Log failed tests to summary | |
| if: steps.test.outcome == 'failure' | |
| run: | | |
| echo "## ❌ Test Failures" >> $GITHUB_STEP_SUMMARY | |
| echo "" >> $GITHUB_STEP_SUMMARY | |
| echo '```' >> $GITHUB_STEP_SUMMARY | |
| # Extract failed test names and error messages | |
| grep -A 5 "FAIL\|✕\|Error:" test-output.txt | head -100 >> $GITHUB_STEP_SUMMARY || echo "Could not extract failure details" >> $GITHUB_STEP_SUMMARY | |
| echo '```' >> $GITHUB_STEP_SUMMARY | |
| echo "" >> $GITHUB_STEP_SUMMARY | |
| - name: Fail if tests failed | |
| if: steps.test.outcome == 'failure' | |
| run: exit 1 | |
| performance: | |
| name: Performance | |
| runs-on: ubuntu-latest | |
| needs: build | |
| env: | |
| NX_DAEMON: "false" | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| - name: Setup Node | |
| uses: actions/setup-node@v6 | |
| with: | |
| node-version-file: ".nvmrc" | |
| cache: "yarn" | |
| - name: Install dependencies | |
| run: yarn install --frozen-lockfile | |
| - name: Restore build artifacts | |
| uses: actions/cache/restore@v4 | |
| with: | |
| path: | | |
| node_modules | |
| libs/*/dist | |
| key: build-${{ github.sha }} | |
| - name: Run performance tests | |
| run: npx nx run core:test-perf --passWithNoTests | |
| continue-on-error: true | |
| - name: Generate performance summary | |
| if: always() | |
| run: | | |
| if [ -f "perf-results.json" ]; then | |
| echo "## Performance Test Results" >> $GITHUB_STEP_SUMMARY | |
| echo "" >> $GITHUB_STEP_SUMMARY | |
| node scripts/format-perf-summary.mjs perf-results.json >> $GITHUB_STEP_SUMMARY | |
| else | |
| echo "## Performance Tests" >> $GITHUB_STEP_SUMMARY | |
| echo "" >> $GITHUB_STEP_SUMMARY | |
| echo "No performance results found. Tests may have been skipped or failed to run." >> $GITHUB_STEP_SUMMARY | |
| fi | |
| continue-on-error: true | |
| - name: Upload performance results | |
| if: always() | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: perf-results | |
| path: perf-results.json | |
| if-no-files-found: ignore | |
| retention-days: 30 |