Skip to content

clean up CI#3204

Open
frzyc wants to merge 2 commits into
masterfrom
ci-cleanup
Open

clean up CI#3204
frzyc wants to merge 2 commits into
masterfrom
ci-cleanup

Conversation

@frzyc

@frzyc frzyc commented May 16, 2026

Copy link
Copy Markdown
Owner

Describe your changes

This should speed up CI on PRs.
Cleanup the unit test and format CI to only run on nx affected.
Remove submodule dependency for test step.

Testing/validation

Checklist before requesting a review (leave this PR as draft if any part of this list is not done.)

  • I have commented my code in hard-to understand areas.
  • I have made corresponding changes to README or wiki.
  • For front-end changes, I have updated the corresponding English translations.
  • I have run yarn run mini-ci locally to validate format and lint.
  • If I have added a new library or app, I have updated the deployment scripts to ignore changes as needed

Summary by CodeRabbit

  • Chores

    • CI workflow now runs affected targets in parallel and improves repository fetch/configuration for reliable runs.
    • Cleaned up project configuration and TypeScript references.
  • Tests

    • Removed several test files and test configurations for the localization and assets tooling.
    • Test runner updated to pass when no tests are found.

Review Change Stack

@frzyc frzyc requested a review from nguyentvan7 May 16, 2026 02:19
@frzyc frzyc added the CI Continuous integration / Infrastructure label May 16, 2026
@coderabbitai

coderabbitai Bot commented May 16, 2026

Copy link
Copy Markdown
Contributor

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: ff1874a1-535f-47ab-acfb-681e9f542cec

📥 Commits

Reviewing files that changed from the base of the PR and between 7f086d1 and 3b17412.

📒 Files selected for processing (1)
  • .github/workflows/ci.yml
🚧 Files skipped from review as they are similar to previous changes (1)
  • .github/workflows/ci.yml

Walkthrough

CI switches from nx run-many to nx affected (parallelized) with workflow-level NX env vars and full checkout; dm-localization test targets/configs removed and assets-data Vite test runner set to pass when no tests exist.

Changes

Nx affected migration and library test configuration cleanup

Layer / File(s) Summary
CI workflow - nx affected environment and execution
.github/workflows/ci.yml
Adds NX_DAEMON, NX_BASE, NX_HEAD env vars; uses fetch-depth: 0 checkout and conditional git fetch origin/master on PRs; replaces run-many with yarn nx affected -t <target> --parallel=3 for eslint:lint, test, and typecheck; sets CI: true for test job and normalizes a format step expression.
dm-localization test configuration removal
libs/gi/dm-localization/project.json, libs/gi/dm-localization/tsconfig.json, libs/gi/dm-localization/tsconfig.lib.json
Removes the empty test target from project.json, drops tsconfig.spec.json from tsconfig references, and narrows tsconfig.lib.json excludes to src/**/*.spec.ts and src/**/*.test.ts.
assets-data vite test configuration update
libs/sr/assets-data/vite.config.ts
Adds passWithNoTests: true to Vite test config so the runner succeeds when no tests are present.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Possibly related PRs

Suggested reviewers

  • nguyentvan7

"Somnia here, eyelids heavy, fingers twitch on CI keys,
Swapped run-many for affected, parallel runs like gacha pleas.
Jest configs slipped away, tests now quiet as a cave,
CI sings in steady ticks — roll once more, bless the brave.
🎴✨"

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title 'clean up CI' clearly summarizes the main change focus—optimizing CI workflows—though it lacks specificity about the nx affected implementation details.
Description check ✅ Passed The description covers the main objectives (speed up CI, use nx affected, remove submodule dependency) but lacks issue links and the 'Testing/validation' section is empty with no validation details provided.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch ci-cleanup

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@github-actions

github-actions Bot commented May 16, 2026

Copy link
Copy Markdown
Contributor

[zzz-frontend] [Sat May 16 02:21:47 UTC 2026] - Deployed 6179ffc to https://genshin-optimizer-prs.github.io/pr/3204/zzz-frontend (Takes 3-5 minutes after this completes to be available)

[zzz-frontend] [Sat May 16 02:21:58 UTC 2026] - Deployed 6179ffc to https://genshin-optimizer-prs.github.io/pr/3204/zzz-frontend (Takes 3-5 minutes after this completes to be available)

[sr-frontend] [Sat May 16 02:22:10 UTC 2026] - Deployed 6179ffc to https://genshin-optimizer-prs.github.io/pr/3204/sr-frontend (Takes 3-5 minutes after this completes to be available)

[sr-frontend] [Sat May 16 02:22:15 UTC 2026] - Deployed 6179ffc to https://genshin-optimizer-prs.github.io/pr/3204/sr-frontend (Takes 3-5 minutes after this completes to be available)

[frontend] [Sat May 16 02:22:38 UTC 2026] - Deployed 6179ffc to https://genshin-optimizer-prs.github.io/pr/3204/frontend (Takes 3-5 minutes after this completes to be available)

[zzz-frontend] [Sat May 16 15:07:20 UTC 2026] - Deployed 28afbdc to https://genshin-optimizer-prs.github.io/pr/3204/zzz-frontend (Takes 3-5 minutes after this completes to be available)

[frontend] [Sat May 16 15:07:39 UTC 2026] - Deployed 28afbdc to https://genshin-optimizer-prs.github.io/pr/3204/frontend (Takes 3-5 minutes after this completes to be available)

[sr-frontend] [Sat May 16 15:09:45 UTC 2026] - Deployed 28afbdc to https://genshin-optimizer-prs.github.io/pr/3204/sr-frontend (Takes 3-5 minutes after this completes to be available)

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧹 Nitpick comments (2)
.github/workflows/ci.yml (2)

29-31: ⚡ Quick win

Gate Fetch master to PRs only to keep push CI faster.

For push-to-master, NX_BASE/NX_HEAD already come from the push payload, so this fetch is extra stamina drain.

Suggested tweak
       - name: Fetch master
+        if: ${{ github.event_name == 'pull_request' }}
         run: |

Also applies to: 51-53, 98-100

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In @.github/workflows/ci.yml around lines 29 - 31, The "Fetch master" step is
running on all events and should be gated to PRs only to avoid extra fetches on
push; update the CI step with a conditional so it only runs when
github.event_name == 'pull_request' (add an if: condition on the step named
"Fetch master" that wraps the git fetch command), and apply the same change to
the two other identical "Fetch master" occurrences referenced at the other
locations (the steps that run git fetch --no-tags --no-recurse-submodules
--filter=blob:none origin +master:refs/heads/master).

18-19: ⚡ Quick win

Refactor fetch refspec for clarity, but current approach works.

The concern about origin/master being missing doesn't manifest in practice—git automatically updates remote tracking branches even with the explicit refs/heads/master target. That said, the proposed change is still worth doing for code clarity: writing directly to refs/remotes/origin/master makes the intent crystal-clear and avoids relying on implicit git behavior.

At 3 AM (every AM when you're hooked on gacha), clarity is king. Future-you (and future maintainers) will appreciate not having to reverse-engineer whether git auto-updates the remote tracking branch or not.

-          git fetch --no-tags --no-recurse-submodules --filter=blob:none origin +master:refs/heads/master
+          git fetch --no-tags --no-recurse-submodules --filter=blob:none origin +master:refs/remotes/origin/master

Also applies to: 53, 100

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In @.github/workflows/ci.yml around lines 18 - 19, Replace the implicit
"origin/master" refspec with the explicit remote-tracking ref
"refs/remotes/origin/master" for clarity: update the NX_BASE default (and the
other two analogous occurrences mentioned) so they use
"refs/remotes/origin/master" instead of "origin/master" (leave NX_HEAD logic
unchanged); this makes the intent explicit and avoids relying on git's implicit
updating of remote-tracking branches.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Nitpick comments:
In @.github/workflows/ci.yml:
- Around line 29-31: The "Fetch master" step is running on all events and should
be gated to PRs only to avoid extra fetches on push; update the CI step with a
conditional so it only runs when github.event_name == 'pull_request' (add an if:
condition on the step named "Fetch master" that wraps the git fetch command),
and apply the same change to the two other identical "Fetch master" occurrences
referenced at the other locations (the steps that run git fetch --no-tags
--no-recurse-submodules --filter=blob:none origin +master:refs/heads/master).
- Around line 18-19: Replace the implicit "origin/master" refspec with the
explicit remote-tracking ref "refs/remotes/origin/master" for clarity: update
the NX_BASE default (and the other two analogous occurrences mentioned) so they
use "refs/remotes/origin/master" instead of "origin/master" (leave NX_HEAD logic
unchanged); this makes the intent explicit and avoids relying on git's implicit
updating of remote-tracking branches.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: 2739c93c-0d36-4a24-8d74-934aed1a22e8

📥 Commits

Reviewing files that changed from the base of the PR and between 2937f8a and 7f086d1.

📒 Files selected for processing (9)
  • .github/workflows/ci.yml
  • libs/gi/dm-localization/jest.config.ts
  • libs/gi/dm-localization/project.json
  • libs/gi/dm-localization/src/executors/gen-locale/executor.spec.ts
  • libs/gi/dm-localization/tsconfig.json
  • libs/gi/dm-localization/tsconfig.lib.json
  • libs/gi/dm-localization/tsconfig.spec.json
  • libs/sr/assets-data/src/executors/gen-assets-data/executor.spec.ts
  • libs/sr/assets-data/vite.config.ts
💤 Files with no reviewable changes (5)
  • libs/gi/dm-localization/tsconfig.spec.json
  • libs/gi/dm-localization/src/executors/gen-locale/executor.spec.ts
  • libs/gi/dm-localization/jest.config.ts
  • libs/sr/assets-data/src/executors/gen-assets-data/executor.spec.ts
  • libs/gi/dm-localization/tsconfig.json

Comment thread .github/workflows/ci.yml
env:
NX_DAEMON: false
# PR: diff vs refs/remotes/origin/master
# Push to master: event.before→sha

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does this work properly when you push to a PR? Is the event_name gonna be push or pull_request?

Comment thread .github/workflows/ci.yml
env:
NX_DAEMON: false
# PR: diff vs refs/remotes/origin/master
# Push to master: event.before→sha

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also, why not just let master run the entire suite of tests + lint + etc, we are not going to be blocked by waiting for that to finish in 99.999% of cases I can think of, and it can be helpful to get full coverage for our limited testing

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CI Continuous integration / Infrastructure

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants