Skip to content

Commit

Permalink
Merge branch 'develop-postgres' into migration_to_vitest
Browse files Browse the repository at this point in the history
  • Loading branch information
prayanshchh authored Nov 23, 2024
2 parents 0fc12b2 + ea145f2 commit 4ab8e9b
Showing 1 changed file with 79 additions and 0 deletions.
79 changes: 79 additions & 0 deletions .github/workflows/pull-request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -260,6 +260,85 @@ jobs:
- name: Validate Documents
run: graphql-inspector validate './src/GraphQl/**/*.ts' './talawa-api/schema.graphql'

Start-App-Without-Docker:
name: Check if Talawa Admin app starts (No Docker)
runs-on: ubuntu-latest
needs: [Code-Quality-Checks, Test-Application]
if: github.actor != 'dependabot'
steps:
- name: Checkout the Repository
uses: actions/checkout@v4

- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: '20.x'

- name: Install Dependencies
run: npm install

- name: Build Production App
run: npm run build

- name: Start Production App
run: |
npm run preview &
echo $! > .pidfile_prod
- name: Check if Production App is running
run: |
timeout=120
echo "Starting production health check with ${timeout}s timeout"
while ! nc -z localhost 4173 && [ $timeout -gt 0 ]; do
sleep 1
timeout=$((timeout-1))
if [ $((timeout % 10)) -eq 0 ]; then
echo "Still waiting for production app to start... ${timeout}s remaining"
fi
done
if [ $timeout -eq 0 ]; then
echo "Timeout waiting for production application to start"
exit 1
fi
echo "Production app started successfully"
- name: Stop Production App
run: |
if [ -f .pidfile_prod ]; then
kill "$(cat .pidfile_prod)"
fi
- name: Start Development App
run: |
npm run serve &
echo $! > .pidfile_dev
- name: Check if Development App is running
run: |
timeout=120
echo "Starting development health check with ${timeout}s timeout"
while ! nc -z localhost 4321 && [ $timeout -gt 0 ]; do
sleep 1
timeout=$((timeout-1))
if [ $((timeout % 10)) -eq 0 ]; then
echo "Still waiting for development app to start... ${timeout}s remaining"
fi
done
if [ $timeout -eq 0 ]; then
echo "Timeout waiting for development application to start"
exit 1
fi
echo "Development app started successfully"
- name: Stop Development App
if: always()
run: |
if [ -f .pidfile_dev ]; then
kill "$(cat .pidfile_dev)"
fi
Docker-Start-Check:
name: Check if Talawa Admin app starts in Docker
runs-on: ubuntu-latest
Expand Down

0 comments on commit 4ab8e9b

Please sign in to comment.