Skip to content

Bump path-to-regexp and express in /backend #15

Bump path-to-regexp and express in /backend

Bump path-to-regexp and express in /backend #15

Workflow file for this run

name: Stable Diffusion CI
on:
push:
branches: [ main ]
paths:
- '**'
pull_request:
branches: [ main ]
paths:
- '**'
jobs:
backend:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up Node.js for linting
uses: actions/setup-node@v2
with:
node-version: '20'
- name: Install backend dependencies
run: |
cd backend
npm install
- name: Lint backend
run: |
cd backend
npm run lint
- name: Run backend tests
run: |
cd backend
npm run test
frontend:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up Node.js for linting
uses: actions/setup-node@v2
with:
node-version: '20'
- name: Install frontend dependencies
run: |
cd frontend
npm install
- name: Lint frontend
run: |
cd frontend
npm run lint
- name: Run frontend tests
run: |
cd frontend
npm run test
check-docker-compose:
runs-on: ubuntu-latest
needs: [backend, frontend]
steps:
- uses: actions/checkout@v2
- name: Start services
run: docker-compose up -d
- name: Wait for frontend service to become healthy
run: |
echo "Waiting for frontend service to become healthy..."
RETRIES=10
while [ $RETRIES -gt 0 ]; do
HEALTH_STATUS=$(docker inspect --format='{{.State.Health.Status}}' $(docker-compose ps -q frontend))
if [ "$HEALTH_STATUS" == "healthy" ]; then
echo "frontend service is healthy."
break
else
echo "Waiting for frontend service to become healthy. Current status: $HEALTH_STATUS"
sleep 10
RETRIES=$((RETRIES-1))
fi
done
if [ $RETRIES -le 0 ]; then
echo "frontend service did not become healthy in time."
exit 1
fi
- name: Shutdown services
run: docker-compose down