ci: set up GitHub Actions CI workflow (T431224) - #48
Open
pushpaktiwarii wants to merge 1 commit into
Open
Conversation
|
@pushpaktiwarii is attempting to deploy a commit to the Tiisu's projects Team on Vercel. A member of the Team first needs to authorize it. |
pushpaktiwarii
force-pushed
the
T431224-ci-setup
branch
from
July 10, 2026 20:54
d126070 to
2eecfb9
Compare
Added a GitHub Actions workflow to run backend tests and frontend builds on pull requests. While setting up CI, I fixed the backend test environment by adding test-only JWT secrets and removed a stale import referencing a deleted route so the test suite can run successfully.
There was a problem hiding this comment.
Pull request overview
Adds a GitHub Actions CI workflow and adjusts backend test scaffolding so the backend test suite and frontend build can run reliably in CI (and locally without external dependencies).
Changes:
- Adds a GitHub Actions workflow to install dependencies, run backend tests, and build the frontend on pushes/PRs to
main. - Updates backend test setup to provide JWT secrets during test runs and removes a stale route import/registration from the test Express app.
- Fixes a minor formatting issue in the backend
.env.example.
Reviewed changes
Copilot reviewed 3 out of 4 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
backend/tests/utils/testApp.js |
Removes stale Wikimedia OAuth route wiring from the test app. |
backend/tests/setup.js |
Sets test-only JWT secrets during test environment setup to prevent auth-related failures. |
backend/.env.example |
Minor formatting/line alignment fix. |
.github/workflows/ci.yml |
Introduces CI workflow to run backend tests and frontend build. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
+17
to
+40
| steps: | ||
| - uses: actions/checkout@v4 | ||
|
|
||
| - name: Use Node.js ${{ matrix.node-version }} | ||
| uses: actions/setup-node@v4 | ||
| with: | ||
| node-version: ${{ matrix.node-version }} | ||
| cache: 'npm' | ||
| cache-dependency-path: | | ||
| backend/package-lock.json | ||
| frontend/package-lock.json | ||
|
|
||
| - name: Install backend dependencies | ||
| working-directory: ./backend | ||
| run: npm ci | ||
|
|
||
| - name: Run backend tests | ||
| working-directory: ./backend | ||
| run: npm test | ||
|
|
||
| - name: Install frontend dependencies | ||
| working-directory: ./frontend | ||
| run: npm ci | ||
|
|
Comment on lines
+41
to
+43
| - name: Build frontend | ||
| working-directory: ./frontend | ||
| run: npm run build |
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Description
Resolves task T431224.
This PR introduces a GitHub Actions CI workflow that automatically installs dependencies, runs backend tests, and builds the frontend on pull requests.
While setting up the CI, I also fixed the backend test environment so the test suite can run successfully without any local dependencies:
setup.jsto prevent auth-related failures.wikimediaOAuth1Routes) intestApp.jsreferencing a deleted route..env.example.Acceptance Criteria Met
npm testpasses (usesmongodb-memory-server)npm run buildpasses