From e5f64b595510dfa6d838d0f98240dd3483d02ccf Mon Sep 17 00:00:00 2001 From: Kristopher Cargile Date: Mon, 12 Oct 2026 06:38:33 -0600 Subject: [PATCH 1/3] Add CI workflow configuration for pull requests and pushes Signed-off-by: Kristopher Cargile --- .github/workflows/ci.yml | 94 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 94 insertions(+) create mode 100644 .github/workflows/ci.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..527e286 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,94 @@ +name: CI + +on: + pull_request: + branches: [main, develop, release/*, hotfix/*] + paths-ignore: + - "**/README.md" + - ".vscode/**" + - ".devcontainer/**" + - ".claude/**" + - ".husky/**" + - "scripts/*" + push: + branches: [main, develop, release/*, hotfix/*] + paths-ignore: + - "**/README.md" + - ".vscode/**" + - ".devcontainer/**" + - ".claude/**" + - ".husky/**" + - "docs/**" + - "scripts/*" + +permissions: + contents: read + +concurrency: + group: ci-${{ github.workflow }}-${{ github.head_ref || github.ref }} + cancel-in-progress: ${{ github.event_name == 'pull_request' }} + +jobs: + ci: + runs-on: ubuntu-latest + if: ${{ github.actor != 'dependabot[bot]' }} + steps: + - name: Checkout + uses: actions/checkout@v4 + with: + fetch-depth: 0 + + - name: Setup pnpm + uses: pnpm/action-setup@v4 + with: + run_install: false + + - name: Setup Node + uses: actions/setup-node@v4 + with: + node-version: 24 + cache: pnpm + + - name: Determine whether CI tasks are affected + id: turbo_ignore + shell: bash + run: | + set +e + pnpm dlx turbo-ignore --task=lint --fallback=HEAD~1 + exit_code=$? + set -e + + if [ "$exit_code" -eq 0 ]; then + echo "run_ci=false" >> "$GITHUB_OUTPUT" + echo "No affected packages detected for lint task." + elif [ "$exit_code" -eq 1 ]; then + echo "run_ci=true" >> "$GITHUB_OUTPUT" + echo "Affected packages detected. Running CI checks." + else + echo "turbo-ignore failed unexpectedly (exit ${exit_code})." + exit "$exit_code" + fi + + - name: Install deps + if: steps.turbo_ignore.outputs.run_ci == 'true' + run: pnpm install --frozen-lockfile + + - name: Lint + if: steps.turbo_ignore.outputs.run_ci == 'true' + run: pnpm lint + + - name: Build + if: steps.turbo_ignore.outputs.run_ci == 'true' + run: pnpm build + + - name: Typecheck + if: steps.turbo_ignore.outputs.run_ci == 'true' + run: pnpm typecheck + + - name: Test + if: steps.turbo_ignore.outputs.run_ci == 'true' + run: pnpm test + + - name: Skipped summary + if: steps.turbo_ignore.outputs.run_ci == 'false' + run: echo "CI checks skipped because no relevant package changes were detected." From a7a83e7e83b2c3ea3640668b0dd0eed2eafba242 Mon Sep 17 00:00:00 2001 From: Kristopher Cargile Date: Tue, 20 Oct 2026 05:11:01 -0600 Subject: [PATCH 2/3] Update concurrency group for CI workflow Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com> Signed-off-by: Kristopher Cargile --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 527e286..a133cbe 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -25,7 +25,7 @@ permissions: contents: read concurrency: - group: ci-${{ github.workflow }}-${{ github.head_ref || github.ref }} + group: ci-${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} cancel-in-progress: ${{ github.event_name == 'pull_request' }} jobs: From 0893bb78b952aa620efe6dbc61ea0f8213f0d957 Mon Sep 17 00:00:00 2001 From: Kristopher Cargile Date: Tue, 20 Oct 2026 05:11:26 -0600 Subject: [PATCH 3/3] Modify lint task fallback in CI workflow Update lint task fallback to use dynamic SHA based on event. Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com> Signed-off-by: Kristopher Cargile --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index a133cbe..ad18fdf 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -54,7 +54,7 @@ jobs: shell: bash run: | set +e - pnpm dlx turbo-ignore --task=lint --fallback=HEAD~1 + pnpm dlx turbo-ignore --task=lint --fallback="${{ github.event_name == 'push' && github.event.before || github.event.pull_request.base.sha }}" exit_code=$? set -e