This project uses GitHub Actions for continuous integration (lint and unit tests). Deployment is managed by Vercel itself. There are three main workflows:
Triggered on pushes to any branch except main.
- checks - Runs code quality checks
- Rubocop (Ruby linting)
- RSpec (unit tests, excluding e2e tests)
Note: GitHub Actions does not build or deploy. Vercel handles deployments directly.
Triggered on pushes to the main branch.
- checks - Runs code quality checks
- Rubocop (Ruby linting)
- RSpec (unit tests, excluding e2e tests)
Note: GitHub Actions does not build or deploy. Vercel handles deployments directly.
Triggered by Vercel repository dispatch events when deployments complete.
-
test-preview - Tests preview deployments
- Runs when
vercel.deployment.successorvercel.deployment.readyevents are received - Only executes for preview environment deployments
- Uses
bin/test_api.rbwith the preview URL - Includes Chrome setup for browser-based testing
- Runs when
-
test-production - Tests production deployments
- Runs when
vercel.deployment.successorvercel.deployment.readyevents are received - Only executes for production environment deployments
- Uses
bin/test_api.rbwithout arguments (tests production URL) - Includes Chrome setup for browser-based testing
- Runs when
The following secrets must be configured in your GitHub repository settings:
GITHUB_TOKEN- Used for status, should exist by defaultVERCEL_AUTOMATION_BYPASS_SECRET- Used to bypass Vercel's protection for automated testing
-
Get Vercel secret:
-
Add secret to GitHub:
- Go to your repository settings
- Navigate to "Secrets and variables" → "Actions"
- Add the required secrets
-
Test the workflows:
- Create a pull request to test the PR workflow
- Merge to main to test the production workflow
- E2E tests will run automatically when Vercel deployments complete
- Dependency Caching: Ruby gems are cached for faster builds
- Parallel Execution: Jobs run in parallel where possible
- Fail Fast: If checks fail, deployment is skipped
- E2E Testing: Automated testing of deployed applications via repository dispatch
- Chrome Integration: Uses headless Chrome for browser-based testing
- Environment-Specific Testing: Separate test jobs for preview and production environments
Vercel manages builds and deployments, this is setup by default.
- Rubocop failures: Check code style with
bundle exec rubocop - RSpec failures: Run tests locally with
bundle exec rspec - Deployment failures: Verify Vercel secrets are correct
- E2E test failures: Check if the deployed URL is accessible and API is responding
- Duplicate deployments: Make sure Vercel auto-deployments are disabled