Skip to content

feat: Add GitHub Actions CI (lint + tests)#132

Merged
Sing-Li merged 15 commits intoRocketChat:masterfrom
srijnabhargav:feat/ci-integration
Mar 27, 2026
Merged

feat: Add GitHub Actions CI (lint + tests)#132
Sing-Li merged 15 commits intoRocketChat:masterfrom
srijnabhargav:feat/ci-integration

Conversation

@srijnabhargav
Copy link
Copy Markdown
Contributor

PR description

This PR adds a GitHub Actions workflow so every pull request and push to main runs the same checks developers use locally: install dependencies, ESLint, and Node regression tests (node --test).

Changes

  • Add .github/workflows/ci.yml: checkout, Node 20, cache npm, install root + src/server deps, npm run lint, npm test.
  • Use npm ci --legacy-peer-deps for the root install so CI matches the repo’s peer-dependency resolution (plain npm ci fails on the current webpack / uglifyjs-webpack-plugin peer range).
  • Add .github/README.md with instructions to enable branch protection and require the CI status check before merging (manual step in repo Settings → Branches).
  • Apply ESLint --fix on src/server/app.js so lint passes under the existing .eslintrc rules.

AI-assisted contribution disclosure - Mostly AI-generate

@srijnabhargav
Copy link
Copy Markdown
Contributor Author

Please check: #128 (comment)

@Sing-Li
Copy link
Copy Markdown
Member

Sing-Li commented Mar 27, 2026

@srijnabhargav I cannot get the action to successfully complete.

seems to be complaining that dotenv version missing in the package.lock

Resolve the lockfile deletion conflict by aligning the workflow with upstream's no-lockfile setup and using npm install for CI dependency steps.
Switch the workflow back to npm ci now that upstream master has restored synced lockfiles for both dependency sets.
@srijnabhargav
Copy link
Copy Markdown
Contributor Author

Hello sir, master branch changed again 😅 and the synced lockfiles were added back upstream, so I realigned this branch with that.

I merged latest master and switched the workflow back to the lockfile-based setup: npm ci --legacy-peer-deps at the root, npm --prefix src/server ci, and restored npm caching.

@Sing-Li
Copy link
Copy Markdown
Member

Sing-Li commented Mar 27, 2026

Screenshot 2026-03-26 at 9 22 58 PM

Double path problem.

@srijnabhargav
Copy link
Copy Markdown
Contributor Author

ci is green now 🥳🥳

@Sing-Li
Copy link
Copy Markdown
Member

Sing-Li commented Mar 27, 2026

Awesome. LGTM

@Sing-Li Sing-Li merged commit bd6c53f into RocketChat:master Mar 27, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants