Skip to content

Migrated Disease and Hospital API to Mongoose #154

Migrated Disease and Hospital API to Mongoose

Migrated Disease and Hospital API to Mongoose #154

Workflow file for this run

name: Playwright Tests and Vercel Deployment
on:
push:
branches: [main, master]
pull_request:
branches: [main, master]
jobs:
deploy-and-test:
timeout-minutes: 60
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 18
- name: Install dependencies
run: npm ci
- name: Install Vercel CLI
run: npm install --global vercel@canary
- name: Pull Vercel Environment Information
run: vercel pull --yes --environment=production --token=${{ secrets.VERCEL_TOKEN }}
- name: Build Project Artifacts
run: vercel build --prod --token=${{ secrets.VERCEL_TOKEN }}
- name: Deploy Project Artifacts to Vercel
run: vercel deploy --prebuilt --prod --token=${{ secrets.VERCEL_TOKEN }}
- name: Install Playwright Browsers
run: npx playwright install --with-deps
- name: Run Playwright tests
run: npx playwright test
- uses: actions/upload-artifact@v4
if: ${{ !cancelled() }}
with:
name: playwright-report
path: playwright-report/
retention-days: 30
- name: Rollback Deployment on Test Failure
if: ${{ failure() }}
run: vercel rollback --token=${{ secrets.VERCEL_TOKEN }}