Skip to content

Edit Dockerfile for multistaging #9

Edit Dockerfile for multistaging

Edit Dockerfile for multistaging #9

Workflow file for this run

name: CI/CD Pipeline
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
jobs:
build-frontend:
runs-on: ubuntu-latest
defaults:
run:
working-directory: ./peer-prep-fe/
strategy:
matrix:
node-version: [18.x, 20.x, 22.x]
steps:
- name: Checkout code
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: './peer-prep-fe/package-lock.json'
- name: Install dependencies
run: npm install
- name: Build frontend
run: npm run build --if-present
- name: Run tests
run: npm test -- --watch=false --browsers=ChromeHeadless
build-backend:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up Go
uses: actions/setup-go@v4
with:
go-version: 1.23
- name: Build backend
run: |
cd peer-prep-be
go build -o ./src ./src
# - name: Test backend
# run: |
# cd peer-prep-be
# go test -v ./main
# deploy:
# needs: [build-frontend, build-backend]
# runs-on: ubuntu-latest
# steps:
# - name: Checkout code
# uses: actions/checkout@v4
# - name: Deploy Application
# run: ./deploy.sh