refactor: code-review-tools skills-based architecture with CLI support #6
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: CI | |
| on: | |
| pull_request: | |
| branches: [main] | |
| jobs: | |
| check: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: oven-sh/setup-bun@v2 | |
| with: | |
| bun-version: latest | |
| - name: Install dependencies | |
| run: bun install --frozen-lockfile | |
| - name: Lint | |
| run: bun run lint | |
| - name: Build | |
| run: bun run build | |
| - name: Type check | |
| run: bun run typecheck | |
| - name: Test | |
| run: bun test | |
| validate-plugins: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| - uses: oven-sh/setup-bun@v2 | |
| with: | |
| bun-version: latest | |
| - name: Install dependencies | |
| run: bun install --frozen-lockfile | |
| - name: Get modified plugins | |
| id: changed-plugins | |
| run: | | |
| plugins=$(git diff --name-only origin/${{ github.base_ref }}...HEAD -- 'plugins/' | \ | |
| grep -oE 'plugins/[^/]+' | sort -u || true) | |
| echo "plugins<<EOF" >> $GITHUB_OUTPUT | |
| echo "$plugins" >> $GITHUB_OUTPUT | |
| echo "EOF" >> $GITHUB_OUTPUT | |
| - name: Validate modified plugins | |
| if: steps.changed-plugins.outputs.plugins != '' | |
| run: | | |
| failed=0 | |
| while IFS= read -r plugin_dir; do | |
| [ -z "$plugin_dir" ] && continue | |
| if [ -f "${plugin_dir}/plugin.json" ]; then | |
| echo "Validating: $plugin_dir" | |
| if ! bun cli/scripts/validate-plugin.ts "$plugin_dir"; then | |
| failed=1 | |
| fi | |
| fi | |
| done <<< "${{ steps.changed-plugins.outputs.plugins }}" | |
| exit $failed |