|
| 1 | +name: Cache Investigation |
| 2 | +on: |
| 3 | + workflow_dispatch: |
| 4 | + inputs: |
| 5 | + investigation_type: |
| 6 | + description: 'Type of investigation to run' |
| 7 | + required: true |
| 8 | + default: 'quick' |
| 9 | + type: choice |
| 10 | + options: |
| 11 | + - quick |
| 12 | + - full |
| 13 | + - cache-only |
| 14 | + - env-only |
| 15 | + |
| 16 | +jobs: |
| 17 | + investigate: |
| 18 | + runs-on: ubuntu-latest |
| 19 | + timeout-minutes: 30 |
| 20 | + |
| 21 | + steps: |
| 22 | + - uses: actions/checkout@v4 |
| 23 | + - name: Setup Node.js |
| 24 | + uses: actions/setup-node@v4 |
| 25 | + with: |
| 26 | + node-version: '20' |
| 27 | + cache: 'yarn' |
| 28 | + |
| 29 | + - name: ⬢ Enable Corepack |
| 30 | + run: npm install --global --force corepack |
| 31 | + |
| 32 | + - name: Install dependencies |
| 33 | + env: |
| 34 | + GITHUB_TOKEN: ${{ github.token }} |
| 35 | + run: | |
| 36 | + yarn install --frozen-lockfile --inline-builds |
| 37 | + yarn --cwd packages/create-cedar-rsc-app install --inline-builds |
| 38 | +
|
| 39 | + - name: Run Cache Investigation |
| 40 | + env: |
| 41 | + NX_CLOUD_ACCESS_TOKEN: ${{ secrets.NX_CLOUD_ACCESS_TOKEN }} |
| 42 | + YARN_ENABLE_HARDENED_MODE: 0 |
| 43 | + run: | |
| 44 | + echo "🔍 Starting cache investigation: ${{ inputs.investigation_type }}" |
| 45 | + case "${{ inputs.investigation_type }}" in |
| 46 | + "quick") |
| 47 | + yarn tsx tasks/framework-tools/tarsync/debug-master.mts quick |
| 48 | + ;; |
| 49 | + "full") |
| 50 | + yarn tsx tasks/framework-tools/tarsync/debug-master.mts all |
| 51 | + ;; |
| 52 | + "cache-only") |
| 53 | + yarn tsx tasks/framework-tools/tarsync/debug-cache-investigation.mts |
| 54 | + ;; |
| 55 | + "env-only") |
| 56 | + yarn tsx tasks/framework-tools/tarsync/debug-env-differences.mts |
| 57 | + ;; |
| 58 | + esac |
| 59 | +
|
| 60 | + - name: Upload Investigation Reports |
| 61 | + uses: actions/upload-artifact@v4 |
| 62 | + if: always() |
| 63 | + with: |
| 64 | + name: cache-investigation-reports |
| 65 | + path: | |
| 66 | + cache-investigation-report.json |
| 67 | + environment-analysis-report.json |
| 68 | + task-scheduling-report.json |
| 69 | + retention-days: 30 |
| 70 | + |
| 71 | + - name: Debug Investigation Failure |
| 72 | + if: failure() |
| 73 | + run: | |
| 74 | + echo "=== Investigation Debug Info ===" |
| 75 | + ls -la *-report.json || echo "No reports generated" |
| 76 | + df -h |
| 77 | + free -h |
| 78 | + echo "=== Nx Cache Status ===" |
| 79 | + ls -la .nx/cache || echo "No cache directory" |
| 80 | + echo "=== Directory structure ===" |
| 81 | + ls -la |
0 commit comments