chore(devcontainer): add superpowers plugin to managed settings #9
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: Tests | |
| on: | |
| push: | |
| branches: [main] | |
| paths-ignore: | |
| - '_bmad-output/**' | |
| - 'docs/**' | |
| - '.claude/**' | |
| - '*.md' | |
| pull_request: | |
| types: [opened, synchronize, reopened, ready_for_review] | |
| paths-ignore: | |
| - '_bmad-output/**' | |
| - 'docs/**' | |
| - '.claude/**' | |
| - '*.md' | |
| jobs: | |
| test: | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 15 | |
| if: github.event.pull_request.draft == false || github.event_name == 'push' | |
| permissions: | |
| contents: read | |
| steps: | |
| - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4 | |
| - uses: pnpm/action-setup@fe02b34f77f8bc703788d5817da081398fad5dd2 # v4 | |
| - uses: actions/setup-node@39370e3970a6d050c480ffad4ff0ed4d3fdee5af # v4 | |
| with: | |
| node-version-file: package.json | |
| cache: 'pnpm' | |
| - name: Install dependencies | |
| run: pnpm install --frozen-lockfile | |
| - name: Run tests with coverage | |
| run: pnpm --filter bmad-dashboard test:coverage | |
| - name: Upload coverage | |
| uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # v4 | |
| with: | |
| name: coverage-current | |
| path: packages/bmad-dashboard/coverage/ | |
| retention-days: 1 | |
| test-base: | |
| if: (github.event_name == 'pull_request' && github.event.pull_request.draft == false) || (github.event_name == 'push' && github.event.before != '0000000000000000000000000000000000000000') | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 15 | |
| continue-on-error: true | |
| permissions: | |
| contents: read | |
| outputs: | |
| cache-hit: ${{ steps.cache-coverage.outputs.cache-hit }} | |
| env: | |
| BASE_SHA: ${{ github.event.pull_request.base.sha || github.event.before }} | |
| steps: | |
| - name: Restore cached base coverage | |
| id: cache-coverage | |
| uses: actions/cache@1bd1e32a3bdc45362d1e726936510720a7c30a57 # v4 | |
| with: | |
| path: coverage-cached/ | |
| key: coverage-${{ env.BASE_SHA }} | |
| - name: Upload cached coverage as artifact | |
| if: steps.cache-coverage.outputs.cache-hit == 'true' | |
| uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # v4 | |
| with: | |
| name: coverage-base | |
| path: coverage-cached/ | |
| retention-days: 1 | |
| - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4 | |
| if: steps.cache-coverage.outputs.cache-hit != 'true' | |
| with: | |
| ref: ${{ env.BASE_SHA }} | |
| - uses: pnpm/action-setup@fe02b34f77f8bc703788d5817da081398fad5dd2 # v4 | |
| if: steps.cache-coverage.outputs.cache-hit != 'true' | |
| - uses: actions/setup-node@39370e3970a6d050c480ffad4ff0ed4d3fdee5af # v4 | |
| if: steps.cache-coverage.outputs.cache-hit != 'true' | |
| with: | |
| node-version-file: package.json | |
| cache: 'pnpm' | |
| - name: Install dependencies | |
| if: steps.cache-coverage.outputs.cache-hit != 'true' | |
| run: pnpm install --frozen-lockfile | |
| - name: Run tests with coverage | |
| if: steps.cache-coverage.outputs.cache-hit != 'true' | |
| run: pnpm --filter bmad-dashboard test:coverage | |
| - name: Prepare coverage for caching | |
| if: steps.cache-coverage.outputs.cache-hit != 'true' && success() | |
| run: | | |
| mkdir -p coverage-cached | |
| cp -r packages/bmad-dashboard/coverage/. coverage-cached/ | |
| - name: Upload base coverage | |
| if: steps.cache-coverage.outputs.cache-hit != 'true' && success() | |
| uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # v4 | |
| with: | |
| name: coverage-base | |
| path: coverage-cached/ | |
| retention-days: 1 | |
| report: | |
| needs: [test, test-base] | |
| if: ${{ always() && !cancelled() && needs.test.result == 'success' }} | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: read | |
| pull-requests: write | |
| steps: | |
| - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4 | |
| - name: Download current coverage | |
| uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4 | |
| with: | |
| name: coverage-current | |
| path: coverage/ | |
| - name: Download base coverage | |
| if: needs.test-base.outcome == 'success' | |
| continue-on-error: true | |
| uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4 | |
| with: | |
| name: coverage-base | |
| path: coverage-base/ | |
| - name: Coverage Report | |
| uses: davelosert/vitest-coverage-report-action@5b6122e3a819a3be7b27fc961b7faafb3bf00e4d # v2 | |
| with: | |
| json-summary-path: coverage/coverage-summary.json | |
| json-final-path: coverage/coverage-final.json | |
| vite-config-path: packages/bmad-dashboard/vitest.config.ts | |
| json-summary-compare-path: ${{ needs.test-base.outcome == 'success' && 'coverage-base/coverage-summary.json' || '' }} |