[Graphite MQ] Draft PR GROUP:spec_5f5ca7 (PRs 404) #1636
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: Danger | |
| on: | |
| pull_request: | |
| types: [opened, edited, synchronize, reopened, ready_for_review] | |
| jobs: | |
| optimize_ci: | |
| runs-on: [self-hosted, linux] | |
| outputs: | |
| skip: ${{ steps.check_skip.outputs.skip }} | |
| steps: | |
| - name: Optimize CI | |
| id: check_skip | |
| uses: withgraphite/graphite-ci-action@main | |
| with: | |
| graphite_token: ${{ secrets.GRAPHITE_TOKEN }} | |
| danger: | |
| runs-on: [self-hosted, linux] | |
| needs: optimize_ci | |
| if: needs.optimize_ci.outputs.skip == 'false' | |
| permissions: | |
| contents: read | |
| pull-requests: write | |
| issues: write | |
| statuses: write | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v6 | |
| with: | |
| fetch-depth: 0 | |
| - uses: ./.github/actions/setup | |
| with: | |
| darkmatter-cachix-auth-token: ${{ secrets.DARKMATTER_CACHIX_AUTH_TOKEN }} | |
| # Generate a coverage report so the dangerfile has something to surface. | |
| # `continue-on-error` keeps Danger running even if a test fails — Danger | |
| # itself is not the gate for test failures, the test workflow is. | |
| - name: Generate coverage (native) | |
| continue-on-error: true | |
| run: bunx vitest run --project=unit --coverage --coverage.reporter=json-summary --coverage.reporter=text | |
| working-directory: apps/native | |
| - name: Run Danger | |
| run: npx danger ci | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |