|
71 | 71 | - name: Run tests |
72 | 72 | run: pnpm test |
73 | 73 |
|
| 74 | + - name: Upload test results to Trunk |
| 75 | + # Run even when tests fail so flaky/failed results are still reported, |
| 76 | + # but never let an upload problem fail the job. |
| 77 | + if: ${{ !cancelled() }} |
| 78 | + continue-on-error: true |
| 79 | + uses: trunk-io/analytics-uploader@385f1ccdf345b4532dc4b6c665dd432b702b8e28 # v2.1.2 |
| 80 | + with: |
| 81 | + # Scope to each package root. A bare **/junit.xml glob descends into |
| 82 | + # node_modules, where pnpm symlinks workspace packages, and uploads |
| 83 | + # every report many times over. |
| 84 | + junit-paths: "apps/*/junit.xml,packages/*/junit.xml" |
| 85 | + org-slug: posthog-inc |
| 86 | + token: ${{ secrets.TRUNK_API_TOKEN }} |
| 87 | + |
74 | 88 | integration-test: |
75 | 89 | needs: changes |
76 | 90 | # Fail closed: if change detection itself failed, run instead of skipping. |
@@ -140,6 +154,17 @@ jobs: |
140 | 154 | env: |
141 | 155 | CI: true |
142 | 156 |
|
| 157 | + - name: Upload test results to Trunk |
| 158 | + # Run even when E2E tests fail so flaky/failed results are still |
| 159 | + # reported, but never let an upload problem fail the job. |
| 160 | + if: ${{ !cancelled() }} |
| 161 | + continue-on-error: true |
| 162 | + uses: trunk-io/analytics-uploader@385f1ccdf345b4532dc4b6c665dd432b702b8e28 # v2.1.2 |
| 163 | + with: |
| 164 | + junit-paths: "apps/code/tests/e2e/junit.xml" |
| 165 | + org-slug: posthog-inc |
| 166 | + token: ${{ secrets.TRUNK_API_TOKEN }} |
| 167 | + |
143 | 168 | - name: Upload Playwright report |
144 | 169 | uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 |
145 | 170 | if: failure() |
|
0 commit comments