Skip to content

ci: set up GitHub Actions CI workflow (T431224) - #48

Open
pushpaktiwarii wants to merge 1 commit into
Tiisu:mainfrom
pushpaktiwarii:T431224-ci-setup
Open

ci: set up GitHub Actions CI workflow (T431224)#48
pushpaktiwarii wants to merge 1 commit into
Tiisu:mainfrom
pushpaktiwarii:T431224-ci-setup

Conversation

@pushpaktiwarii

Copy link
Copy Markdown
Contributor

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:

  • Added test-only JWT secrets in setup.js to prevent auth-related failures.
  • Removed a stale import (wikimediaOAuth1Routes) in testApp.js referencing a deleted route.
  • Minor formatting fix in .env.example.

Acceptance Criteria Met

  • CI runs on PRs
  • Backend npm test passes (uses mongodb-memory-server)
  • Frontend npm run build passes

@vercel

vercel Bot commented Jul 7, 2026

Copy link
Copy Markdown

@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.

Copilot AI review requested due to automatic review settings July 10, 2026 20:54
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.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

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 thread .github/workflows/ci.yml
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 thread .github/workflows/ci.yml
Comment on lines +41 to +43
- name: Build frontend
working-directory: ./frontend
run: npm run build
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