Skip to content

Checking Accessibility #60

Checking Accessibility

Checking Accessibility #60

name: Accessibility Test
run-name: Checking Accessibility
on: [push]
jobs:
accessibility:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Install dependencies
run: npm ci
- name: Set up Docker
uses: docker/setup-buildx-action@v2
- name: Install Docker Compose
run: |
sudo apt-get update
sudo apt-get install -y docker-compose
- name: Build and run Docker Compose for DB
env:
DATABASE_PASSWORD: ${{ secrets.DATABASE_PASSWORD }}
run: |
docker-compose -f docker-compose.dev.yml up -d
echo "Waiting for database to be ready..."
sleep 30
- name: Run Prisma migrations
env:
DATABASE_URL: postgres://postgres:${{ secrets.DATABASE_PASSWORD }}@localhost:5433/patrigma_db
run: |
npx prisma migrate dev
npx prisma db seed
- name: Build Next.js application
run: npm run build
- name: Start Next.js application
env:
DATABASE_URL: postgres://postgres:${{ secrets.DATABASE_PASSWORD }}@localhost:5433/patrigma_db
NEXTAUTH_SECRET: ${{ secrets.NEXTAUTH_SECRET }}
NEXTAUTH_URL: http://localhost:3000
run: |
npm run start & # Start the Next.js application in the background
echo "Waiting for Next.js to be ready..."
sleep 10
- name: Install xvfb
run: sudo apt-get install -y xvfb
- name: Run Lighthouse CI with xvfb
uses: treosh/lighthouse-ci-action@v12
with:
urls: http://localhost:3000
uploadArtifacts: true
env:
XVFB_RUN_CMD: xvfb-run --auto-servernum --server-args='-screen 0 1024x768x24'