Repository navigation
Add CI workflow configuration for pull requests and pushes #6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
e5f64b5
Add CI workflow configuration for pull requests and pushes
kcargile a7a83e7
Update concurrency group for CI workflow
kcargile 0893bb7
Modify lint task fallback in CI workflow
kcargile e5ced9a
Merge branch 'develop' into k/intro-base-ci
kcargile File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -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.event.pull_request.number || 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="${{ github.event_name == 'push' && github.event.before || github.event.pull_request.base.sha }}" | ||
|
|
||
| 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." | ||
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.