-
Notifications
You must be signed in to change notification settings - Fork 0
ci: add pre-test checks with format, lint, and compile steps #11
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
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| @@ -1,14 +1,20 @@ | ||||||||||||||||||||||||||||||||||
| name: CI | ||||||||||||||||||||||||||||||||||
| run-name: Running continuous integration on ${{ github.actor }}'s commits | ||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||
| # Triggers: | ||||||||||||||||||||||||||||||||||
| # - push to ANY branch (catches feature branches, not tags) | ||||||||||||||||||||||||||||||||||
| # - pull requests targeting main | ||||||||||||||||||||||||||||||||||
| # Does NOT fire on tag-only pushes or unrelated events. | ||||||||||||||||||||||||||||||||||
| on: | ||||||||||||||||||||||||||||||||||
| push: | ||||||||||||||||||||||||||||||||||
| branches: | ||||||||||||||||||||||||||||||||||
| - main | ||||||||||||||||||||||||||||||||||
| - "**" | ||||||||||||||||||||||||||||||||||
| pull_request: | ||||||||||||||||||||||||||||||||||
| branches: | ||||||||||||||||||||||||||||||||||
| - main | ||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||
| jobs: | ||||||||||||||||||||||||||||||||||
| backend-ci: | ||||||||||||||||||||||||||||||||||
| backend-pretest: | ||||||||||||||||||||||||||||||||||
| runs-on: ubuntu-latest | ||||||||||||||||||||||||||||||||||
| steps: | ||||||||||||||||||||||||||||||||||
| - name: Checkout repository | ||||||||||||||||||||||||||||||||||
|
|
@@ -20,14 +26,40 @@ jobs: | |||||||||||||||||||||||||||||||||
| distribution: "temurin" | ||||||||||||||||||||||||||||||||||
| java-version: "25" | ||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||
| frontend-ci: | ||||||||||||||||||||||||||||||||||
| runs-on: ubuntu-latest | ||||||||||||||||||||||||||||||||||
| - name: Format check (Spotless) | ||||||||||||||||||||||||||||||||||
| run: ./mvnw spotless:check | ||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||
| - name: Style check (Checkstyle) | ||||||||||||||||||||||||||||||||||
| run: ./mvnw checkstyle:check | ||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||
| - name: Compile check | ||||||||||||||||||||||||||||||||||
| run: ./mvnw compile | ||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||
| frontend-pretest: | ||||||||||||||||||||||||||||||||||
| runs-on: ubuntu-latest | ||||||||||||||||||||||||||||||||||
| defaults: | ||||||||||||||||||||||||||||||||||
| run: | ||||||||||||||||||||||||||||||||||
| working-directory: js | ||||||||||||||||||||||||||||||||||
| steps: | ||||||||||||||||||||||||||||||||||
| - name: Checkout repository | ||||||||||||||||||||||||||||||||||
| uses: actions/checkout@v6 | ||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||
| - name: Set up node | ||||||||||||||||||||||||||||||||||
| uses: actions/setup-node@v6 | ||||||||||||||||||||||||||||||||||
| - name: Setup pnpm | ||||||||||||||||||||||||||||||||||
| uses: pnpm/action-setup@v6 | ||||||||||||||||||||||||||||||||||
| with: | ||||||||||||||||||||||||||||||||||
| node-version: "24" | ||||||||||||||||||||||||||||||||||
| version: 10.24.0 | ||||||||||||||||||||||||||||||||||
|
Comment on lines
+47
to
+50
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Missing Node.js setup step. The original workflow explicitly installed Node.js v24 using While GitHub's ubuntu-latest runner includes Node.js by default, the version is not guaranteed to match the previously specified v24, which could cause compatibility issues or unexpected build failures. Fix: Add Node.js setup before pnpm setup: - name: Setup Node.js
uses: actions/setup-node@v6
with:
node-version: "24"
- name: Setup pnpm
uses: pnpm/action-setup@v6
with:
version: 10.24.0
Suggested change
Spotted by Graphite |
||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||
| - name: Install dependencies | ||||||||||||||||||||||||||||||||||
| run: pnpm install | ||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||
| - name: Type check | ||||||||||||||||||||||||||||||||||
| run: pnpm run typecheck | ||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||
| - name: Format check | ||||||||||||||||||||||||||||||||||
| run: pnpm run prettier | ||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||
| - name: Lint | ||||||||||||||||||||||||||||||||||
| run: pnpm run lint | ||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||
| - name: Compile check | ||||||||||||||||||||||||||||||||||
| run: pnpm run build | ||||||||||||||||||||||||||||||||||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actually what's the benefit of having CI run on all pushes?