This project contains Playwright automation scripts for Volo Sports that:
- Monitors available pickup games at Mission Bay Fields
- Tracks games you're already registered for
- Sends email notifications when new games become available
- Runs automatically on a schedule via GitHub Actions
- Automatically logs into your Volo Sports account
- Checks games you're currently registered for on your dashboard
- Searches Mission Bay Fields for available pickup soccer games
- Paginates through all results to find every available game
- Extracts game details: date, time, skill level, and spots available
- Filters out games you're already registered for
- Shows only available games you can join
- Tracks previously found games in
previous-games.json - Detects when new games are added
- Sends formatted email notifications with game details
- Includes a direct link to register
- Runs on a schedule via GitHub Actions (default: daily at 9 AM UTC)
- Automatically commits results to track changes between runs
- Can be manually triggered anytime from GitHub Actions UI
-
Install dependencies:
npm install
-
Install Playwright browsers:
npx playwright install chromium
-
Set environment variables: Create a
.envfile in the root directory:# Required VOLO_EMAIL=[email protected] VOLO_PASSWORD=your-password # Optional - Email Notifications EMAIL_ENABLED=true EMAIL_SERVICE=gmail EMAIL_USER=[email protected] EMAIL_PASS=your-app-password EMAIL_TO=[email protected]
For Gmail:
- You'll need to generate an App Password
- Don't use your regular Gmail password
- Enable 2-factor authentication first
-
Run tests locally:
# Run tests in headless mode npm test # Run tests with browser visible npm run test:headed # Debug tests npm run test:debug
The workflow is configured to run automatically on a schedule (daily at 9 AM UTC by default).
-
Add secrets to your GitHub repository:
-
Go to your repository Settings > Secrets and variables > Actions
-
Add the following required secrets:
VOLO_EMAIL: Your Volo Sports emailVOLO_PASSWORD: Your Volo Sports password
-
Add these optional secrets for email notifications:
EMAIL_ENABLED: Set totrueto enable notificationsEMAIL_SERVICE: Email service (e.g.,gmail)EMAIL_USER: Your email addressEMAIL_PASS: Your email app passwordEMAIL_TO: Recipient email address
-
-
Modify the schedule (optional): Edit
.github/workflows/scheduled-login.ymland change the cron expression:schedule: - cron: "0 9 * * *" # Runs at 9:00 AM UTC daily
Common cron examples:
'0 */6 * * *'- Every 6 hours'0 9 * * 1-5'- Every weekday at 9 AM'0 0 * * 0'- Every Sunday at midnight
-
Manual trigger: You can also manually trigger the workflow from the Actions tab in your GitHub repository.
.
โโโ .github/
โ โโโ workflows/
โ โโโ scheduled-login.yml # GitHub Actions workflow
โโโ tests/
โ โโโ login.spec.ts # Main automation script
โโโ playwright.config.ts # Playwright configuration
โโโ package.json # Node.js dependencies
โโโ previous-games.json # Persisted game data (auto-generated)
โโโ README.md # This file
- Login: Authenticates with your Volo Sports credentials
- Dashboard Check: Retrieves your currently registered games
- Discover Search: Navigates to Mission Bay Fields pickup games page
- Pagination: Loops through all pages to collect every available game
- Date Extraction: Associates games with their date headers ("Today", "Sat Nov 1", etc.)
- Filtering: Removes games you're already registered for
- Change Detection: Compares current results with previous run
- Notification: Sends email if new games are found
- Persistence: Saves results for next comparison
The login test uses flexible CSS selectors that should work with most login forms. If the test fails, you may need to update the selectors in tests/login.spec.ts to match the actual form elements on the Volo Sports login page.
Create additional test files in the tests/ directory following the pattern:
import { test, expect } from "@playwright/test";
test("my test", async ({ page }) => {
// Your test code here
});- Test fails on CI: Check the uploaded artifacts in the GitHub Actions run for screenshots and HTML reports
- Selector issues: Use
npm run test:debuglocally to inspect the page and find the correct selectors - Environment variables not working: Ensure secrets are properly set in GitHub repository settings