Skip to content

fix-ci(workflow)#468

Merged
Harxhit merged 1 commit into
Dev-Card:mainfrom
Harxhit:chores/fix-workflow
Jun 3, 2026
Merged

fix-ci(workflow)#468
Harxhit merged 1 commit into
Dev-Card:mainfrom
Harxhit:chores/fix-workflow

Conversation

@Harxhit
Copy link
Copy Markdown
Collaborator

@Harxhit Harxhit commented Jun 3, 2026

Summary

Runs targeted checks only on files changed in a pull request — nothing untouched is re-tested.

Workflow

pull_request_target (opened / synchronize / reopened)
│
▼
detect-changes          ← reads PR file list via GitHub API
┌──────────────────────────────────────────────┐
│ Categorises changed files into               │
│   apps/backend  apps/mobile  apps/web        │
│ Derives test file paths from source files    │
└──────────────────────────────────────────────┘
│
┌─────┼─────┐
▼     ▼     ▼
backend  web  mobile        ← run only if their files changed
└─────┼─────┘
▼
comment-results         ← always runs, posts/updates a PR comment

Jobs

detect-changes

Calls .github/scripts/ciScript.js via actions/github-script.

Outputs:

Output Description
backendChanged true if any apps/backend file changed
mobileChanged true if any apps/mobile file changed
webChanged true if any apps/web file changed
backendFiles Space-separated list of changed backend files (stripped of apps/backend/ prefix)
mobileFiles Same for mobile
webFiles Same for web
backendTestFiles Derived test file paths for changed backend files
mobileTestFiles Derived test file paths for changed mobile files

backend-ci

Runs when backendChanged == 'true'.

Step Command Notes
Lint pnpm eslint <changed files> Runs only on changed files
Test pnpm test --passWithNoTests <derived test files> Skips silently if no tests exist
Typecheck pnpm typecheck Always runs against full tsconfig

web-ci

Runs when webChanged == 'true'.

Step Command
Check pnpm check
Build pnpm build

mobile-ci

Runs when mobileChanged == 'true'.

Step Command Notes
Lint pnpm eslint <changed files> Runs only on changed files
Test pnpm test --passWithNoTests <derived test files> Skips silently if no tests exist

comment-results

Always runs. Posts or updates a single comment on the PR with a results table.
If lint failed, a collapsible block shows the exact file paths and error messages.

Scripts

ciScript.js

Reads the PR's changed files from the GitHub API and categorises them by app.

Test file derivation:
For each changed source file src/routes/cards.ts it looks for a corresponding test at src/__tests__/cards.test.ts. If the changed file is already a test file it is used as-is. No filesystem access — path is derived by convention.

commentResults.js

Builds and posts (or updates) the CI results comment. Accepts per-job and per-step
statuses plus raw lint output. Lint errors are shown in a collapsible block so the
comment stays readable when there are no failures.

@Harxhit Harxhit added the gssoc:approved Required label for every approved PR. Gives the base +50 points and enables contribution tracking. label Jun 3, 2026
@github-actions
Copy link
Copy Markdown

github-actions Bot commented Jun 3, 2026

CI Results — ✅ CI completed

🖥️ Backend (⏭️ skipped)

Check Status
Lint ⚪ unknown
Test ⚪ unknown
Typecheck ⚪ unknown

📱 Mobile (⏭️ skipped)

Check Status
Lint ⚪ unknown
Test ⚪ unknown

🌐 Web (⏭️ skipped)

Check Status
Check ⚪ unknown
Build ⚪ unknown

🕐 Last updated: Wed, 03 Jun 2026 11:17:31 GMT

@Harxhit Harxhit requested a review from ShantKhatri June 3, 2026 11:18
@Harxhit
Copy link
Copy Markdown
Collaborator Author

Harxhit commented Jun 3, 2026

@ShantKhatri Could you please look into this.

@Harxhit Harxhit merged commit f355777 into Dev-Card:main Jun 3, 2026
6 of 7 checks passed
@Harxhit Harxhit added level:critical High-impact or difficult contribution affecting core functionality. (+80 pts) quality:clean PR is well-structured, readable, and follows good practices. (×1.2 multiplier) type:performance Performance optimization (+15 pts) type:refactor Code refactoring/cleanup (+10 pts) type:devops CI/CD, infra, deployment, workflow work (+15 pts) type:bug Bug fixes (+10 pts) labels Jun 3, 2026
ShantKhatri pushed a commit that referenced this pull request Jun 3, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

gssoc:approved Required label for every approved PR. Gives the base +50 points and enables contribution tracking. level:critical High-impact or difficult contribution affecting core functionality. (+80 pts) quality:clean PR is well-structured, readable, and follows good practices. (×1.2 multiplier) type:bug Bug fixes (+10 pts) type:devops CI/CD, infra, deployment, workflow work (+15 pts) type:performance Performance optimization (+15 pts) type:refactor Code refactoring/cleanup (+10 pts)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants