Skip to content

Unnati

Unnati #18

Workflow file for this run

name: CI/CD Pipeline
on:
push:
branches: [ main, develop ]
pull_request:
branches: [ main ]
jobs:
test-frontend:
name: Frontend Tests
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: '20'
cache: 'npm'
cache-dependency-path: frontend/package-lock.json
- name: Install dependencies
working-directory: ./frontend
run: npm ci
- name: Run lint
working-directory: ./frontend
run: npm run lint || true
- name: Build
working-directory: ./frontend
run: npm run build
build-docker:
name: Build Docker Images
runs-on: ubuntu-latest
needs: [test-frontend]
steps:
- uses: actions/checkout@v4
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Build backend image
uses: docker/build-push-action@v5
with:
context: ./backend
push: false
tags: mayopia-backend:latest
cache-from: type=gha
cache-to: type=gha,mode=max
- name: Build frontend image
uses: docker/build-push-action@v5
with:
context: ./frontend
push: false
tags: mayopia-frontend:latest
cache-from: type=gha
cache-to: type=gha,mode=max