Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 29 additions & 0 deletions .github/workflows/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
# CI Workflows

This project uses **GitHub Actions** for continuous integration.

## Workflows Included

- **Mobile Lint**
Runs ESLint in the `mobile/` app directory to enforce code quality and catch errors early.

- **Backend RBAC E2E**
Runs Jest end-to-end tests in `backend/` to verify secure role-based access control.

## How They Run

| Workflow | Trigger |
|---------|---------|
| Mobile Lint | Push to `main` / `dev` + all pull requests |
| Backend RBAC E2E | Push to `main` / `dev` or manual trigger |

## Challenges

- Ensuring proper working directories for monorepo structure (Fixed using `defaults.run.working-directory`)
- Performance during installs (Fixed by caching Node dependency installs)

## In the Future

As we add more testing suites, we will expand our CI pipeline accordingly.

We plan to include full mobile end-to-end testing using [Detox](https://wix.github.io/Detox/) to ensure the entire app behaves correctly on real devices (soon!).
36 changes: 36 additions & 0 deletions .github/workflows/backend-rbac-e2e.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: Backend RBAC E2E

on:
push:
branches: [main, dev, feat/ci-and-tests]
workflow_dispatch:

jobs:
rbac-e2e:
runs-on: ubuntu-latest

defaults:
run:
working-directory: backend

steps:
- name: Checkout repo
uses: actions/checkout@v4

- name: Set up Node
uses: actions/setup-node@v4
with:
node-version: 24
cache: npm
cache-dependency-path: backend/package-lock.json

- name: Install dependencies
run: npm ci

- name: Run RBAC E2E Jest tests
env:
BASE: ${{ secrets.BASE }}
CLERK_SECRET_KEY: ${{ secrets.CLERK_SECRET_KEY }}
STUDENT_ID: ${{ secrets.STUDENT_ID }}
ADMIN_ID: ${{ secrets.ADMIN_ID }}
run: npm test
31 changes: 31 additions & 0 deletions .github/workflows/mobile-lint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: Mobile Lint

on:
push:
branches: [main, dev]
pull_request:

jobs:
lint:
runs-on: ubuntu-latest

defaults:
run:
working-directory: mobile

steps:
- name: Checkout repo
uses: actions/checkout@v4

- name: Set up Node
uses: actions/setup-node@v4
with:
node-version: 24
cache: npm
cache-dependency-path: mobile/package-lock.json

- name: Install dependencies
run: npm ci

- name: Lint with ESLint (Expo)
run: npm run lint
Loading