Skip to content

Add cypress and test login and recently played games #12

Add cypress and test login and recently played games

Add cypress and test login and recently played games #12

Workflow file for this run

name: Tests
on:
workflow_dispatch:
pull_request:
types: [ opened, synchronize, reopened ]
jobs:
cypress-run:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Install dependencies
run: npm install
- name: Start Vite server
run: npm run dev &
env:
CI: true
- name: Wait for Vite server
run: |
for i in {1..10}; do
if curl -s http://localhost:5173/retroleaderboards/; then
echo "Vite server is up!"
break
fi
echo "Waiting for Vite server..."
sleep 2
done
- name: Run Cypress tests
uses: cypress-io/github-action@v6