Skip to content

chore(deps): bump nanoid from 3.3.7 to 3.3.8 in /fe_repo #100

chore(deps): bump nanoid from 3.3.7 to 3.3.8 in /fe_repo

chore(deps): bump nanoid from 3.3.7 to 3.3.8 in /fe_repo #100

Workflow file for this run

name: CI for E2E
on:
pull_request:
branches:
- main
jobs:
e2e-test:
runs-on: ubuntu-latest
services:
frontend:
image: node:18
options: --network-alias frontend
env:
PORT: 3000
ports:
- 3000:3000
backend:
image: python:3.9
options: --network-alias backend
env:
PORT: 5000
ports:
- 5000:5000
steps:
# Step 1: Checkout code
- name: Checkout code
uses: actions/checkout@v3
# Step 2: Start FE
- name: Set up and start frontend
working-directory: ./fe_repo
run: |
npm install -g pnpm
pnpm i
pnpm lint
pnpm build
pnpm preview &
# Step 3: Start BE
- name: Set up and start backend
working-directory: ./be_repo
run: |
pip install -r requirements.txt
python app.py &
# Step 4: Wair for BE and FE Services
- name: Wait for services to be ready
run: |
until curl -s http://localhost:8081; do
echo "Waiting for frontend to be ready..."
sleep 5
done
until curl -s http://localhost:5000; do
echo "Waiting for backend to be ready..."
sleep 5
done
# Step 5: Start E2E Test
- name: Installing package list
run: apt list --installed
- name: Removing previous chrome instances on runner
run: sudo apt purge google-chrome-stable
- name: Installing all necessary packages
run: pip install chromedriver-autoinstaller selenium pyvirtualdisplay pytest
- name: Install xvfb
run: sudo apt-get install xvfb
- name: Run E2E tests
run: |
pytest ./be_repo/tests/test_e2e.py