Repository navigation
Add claude-rc CLI, daemon and Homebrew formula #1343
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: Test | |
| on: | |
| push: | |
| branches: | |
| - main | |
| pull_request: | |
| concurrency: | |
| # On push to main, share concurrency group with CD (bump-and-update-marketplace | |
| # in cd.yaml) to prevent races where both CI (lint auto-fix) and CD (version | |
| # bump) try to push commits simultaneously. On PRs, use a separate group — the | |
| # CD preview job no longer pushes, so PR runs never race CI. | |
| group: ${{ github.ref == 'refs/heads/main' && 'ci-cd-main' || format('ci-{0}', github.ref) }} | |
| cancel-in-progress: ${{ github.event_name == 'pull_request' }} | |
| jobs: | |
| # Lint runs the full auto-fix pass via `mise run format` (which writes | |
| # auto-fixable issues with prettier, then re-runs the read-only checks | |
| # the same way `mise run lint` would). If anything changed or any | |
| # non-fixable check failed, the workflow auto-commits the writes back | |
| # to the PR branch and exits 1 so CI re-runs against the final state. | |
| lint: | |
| runs-on: ubuntu-latest | |
| concurrency: | |
| group: pr-autofix-${{ github.head_ref || github.ref }} | |
| cancel-in-progress: false | |
| permissions: | |
| contents: write | |
| pull-requests: write | |
| steps: | |
| - name: Checkout and authenticate as GitHub App | |
| id: auth | |
| uses: nsheaps/github-actions/.github/actions/checkout-as-app@603052841cd49b9fdc99bc32979ff9c45c9b669e # checkout-as-app@main | |
| with: | |
| app-id: ${{ secrets.AUTOMATION_GITHUB_APP_ID }} | |
| private-key: ${{ secrets.AUTOMATION_GITHUB_APP_PRIVATE_KEY }} | |
| ref: ${{ github.head_ref || github.ref }} | |
| - name: Setup mise and bun deps | |
| uses: ./.github/actions/setup-mise-and-bun | |
| with: | |
| cache: ${{ github.event_name == 'pull_request' }} | |
| - name: mise run format (auto-fix mode) | |
| id: lint | |
| uses: ./.github/actions/lint-files | |
| with: | |
| fix: 'true' | |
| continue-on-error: true | |
| - name: git push (auto-commit lint/format fixes) | |
| if: steps.lint.outputs.changed-or-failed == 'true' && ! cancelled() | |
| id: auto-commit-action | |
| uses: stefanzweifel/git-auto-commit-action@v7 | |
| with: | |
| commit_message: 'chore: `mise run format`' | |
| commit_user_name: ${{ steps.auth.outputs.user-name }} | |
| commit_user_email: ${{ steps.auth.outputs.user-email }} | |
| - name: 'exit 1 # changes detected or lint failed' | |
| if: ${{ steps.lint.outputs.changed-or-failed == 'true' && ! cancelled() }} | |
| run: | | |
| echo "mise run format made changes and/or a non-fixable check failed." | |
| echo "Any writes have been auto-committed; re-run will pick them up." | |
| exit 1 | |
| # Build all workspace packages via nx. Runs in parallel with `test`. | |
| build: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v7 | |
| with: | |
| # Full history needed so nx affected/cache can compare against the base. | |
| fetch-depth: 0 | |
| - name: Setup mise and bun deps | |
| uses: ./.github/actions/setup-mise-and-bun | |
| - name: mise run build (nx run-many --target=build) | |
| run: mise run build | |
| # Test all workspace packages via nx (TS packages → bun test; | |
| # @nsheaps/agents-plugins → claude plugin validate). Runs in parallel with `build`. | |
| test: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v7 | |
| with: | |
| fetch-depth: 0 | |
| - name: Setup mise and bun deps | |
| uses: ./.github/actions/setup-mise-and-bun | |
| - name: mise run test (nx run-many --target=test) | |
| run: mise run test |