Bump axios from 1.6.5 to 1.7.7 in /frontend #32
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Internal Employee 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 backend | |
uses: actions/setup-node@v2 | |
with: | |
node-version: '20' | |
- name: Install backend dependencies | |
run: | | |
cd backend | |
npm install | |
- name: Lint backend code | |
run: | | |
cd backend | |
npm run lint | |
- name: Run backend tests | |
run: | | |
cd backend | |
npm test | |
frontend: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Set up Node.js for frontend | |
uses: actions/setup-node@v2 | |
with: | |
node-version: '20' | |
- name: Install frontend dependencies | |
run: | | |
cd frontend | |
npm install | |
- name: Lint frontend code | |
run: | | |
cd frontend | |
npm run lint | |
- name: Run frontend tests | |
run: | | |
cd frontend | |
npm test | |
check-docker-compose: | |
runs-on: ubuntu-latest | |
needs: [backend, frontend] | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Set up Docker and Docker Compose | |
run: | | |
sudo rm /usr/local/bin/docker-compose | |
curl -L "https://github.com/docker/compose/releases/download/1.29.2/docker-compose-$(uname -s)-$(uname -m)" -o docker-compose | |
chmod +x docker-compose | |
sudo mv docker-compose /usr/local/bin | |
- name: Build and run with Docker Compose | |
run: | | |
docker-compose up -d | |
RETRIES=30 | |
SLEEP_DURATION=30 | |
SUCCESS=false | |
echo "Waiting for the application to start and become available at localhost:4173..." | |
for ((i=0; i<RETRIES; i++)); do | |
if curl -f http://localhost:4173/; then | |
SUCCESS=true | |
break | |
fi | |
echo "Attempt $((i+1)) of $RETRIES failed, retrying in $SLEEP_DURATION seconds..." | |
sleep $SLEEP_DURATION | |
done | |
if [ "$SUCCESS" = true ]; then | |
echo "Successfully connected to the application on localhost:4173!" | |
else | |
echo "Failed to connect to the application on localhost:4173 after $RETRIES retries." | |
exit 1 | |
fi | |
SUCCESS=false | |
echo "Waiting for the application to start and become available at localhost:8000/test..." | |
for ((i=0; i<RETRIES; i++)); do | |
if curl -f http://localhost:8000/test; then | |
SUCCESS=true | |
break | |
fi | |
echo "Attempt $((i+1)) of $RETRIES failed, retrying in $SLEEP_DURATION seconds..." | |
sleep $SLEEP_DURATION | |
done | |
if [ "$SUCCESS" = true ]; then | |
echo "Successfully connected to the application on localhost:8000/test!" | |
else | |
echo "Failed to connect to the application on localhost:8000/test after $RETRIES retries." | |
exit 1 | |
fi | |
- name: Cleanup Docker Compose | |
run: | | |
docker-compose down |