This guide explains how to set up the automated benchmark system in your GitHub repository.
- GitHub repository with admin access
- The repository must be public or have GitHub Actions enabled for private repos
The automation files are already in place. You just need to enable GitHub Actions permissions:
- Go to your repository on GitHub
- Click Settings → Actions → General
- Scroll down to Workflow permissions
- Select Read and write permissions
- Check ✅ Allow GitHub Actions to create and approve pull requests
- Click Save
# Add all the new files
git add .github/workflows/daily-benchmarks.yml
git add scripts/update-readme.js
git add AUTOMATION.md
git add SETUP.md
git add README.md
# Commit the changes
git commit -m "feat: add automated daily benchmark workflow"
# Push to GitHub
git push origin main- Go to the Actions tab in your GitHub repository
- You should see Daily SQLite Benchmarks workflow listed
- The workflow will run automatically:
- Daily at 2:00 AM UTC
- When you push changes to
benchmark.jsor the workflow file - When manually triggered
To test the workflow immediately without waiting for the scheduled run:
- Go to Actions tab
- Click on Daily SQLite Benchmarks workflow
- Click Run workflow button (top right)
- Select the
mainbranch - Click Run workflow
# Install GitHub CLI if needed
# https://cli.github.com/
# Authenticate
gh auth login
# Trigger the workflow
gh workflow run daily-benchmarks.yml# Make a small change to trigger the workflow
echo "# Test" >> benchmark.js
git add benchmark.js
git commit -m "test: trigger workflow"
git push origin main
# Revert if needed
git revert HEAD
git push origin mainAfter the workflow runs:
- Check the Actions tab to see the workflow execution
- Look for updated files in the repository:
benchmark_results_node_v*.jsonfiles should be updatedREADME.mdshould have new benchmark tables
- Check the commit history for automated commits by
github-actions[bot]
Problem: The workflow doesn't show up in the Actions tab.
Solution:
- Ensure the workflow file is in
.github/workflows/directory - Ensure the file has
.ymlor.yamlextension - Check that you've pushed the file to the
mainbranch - Verify the YAML syntax is valid
Problem: The workflow completes successfully but doesn't commit changes.
Solution:
- Check Settings → Actions → General → Workflow permissions
- Ensure Read and write permissions is selected
- Ensure Allow GitHub Actions to create and approve pull requests is checked
Problem: Benchmarks fail for one or more Node.js versions.
Solution: This is expected behavior. The workflow uses continue-on-error: true to allow partial results. Check the workflow logs to see which versions failed and why. Common causes:
- Native module compilation issues
- Node.js version incompatibility with dependencies
- Memory or timeout issues
Problem: Workflow logs show "No changes to commit".
Solution: This is normal if:
- Benchmark results haven't changed significantly
- The workflow ran but produced identical results
- The README already has the latest results
Edit .github/workflows/daily-benchmarks.yml:
on:
schedule:
# Change this cron expression
- cron: '0 2 * * *' # Daily at 2 AM UTCCommon cron patterns:
'0 */6 * * *'- Every 6 hours'0 0 * * 0'- Weekly on Sunday at midnight'0 0 1 * *'- Monthly on the 1st at midnight'0 0 * * 1-5'- Weekdays at midnight
Edit the matrix in .github/workflows/daily-benchmarks.yml:
strategy:
matrix:
node-version: [18, 20, 22, 24, 'latest']
# Add or remove versions as neededEdit scripts/update-readme.js to change:
- Table structure and formatting
- Performance metrics displayed
- Analysis and recommendations
- Additional charts or visualizations
The workflow uses GITHUB_TOKEN which is automatically provided by GitHub Actions. This token:
- Has limited permissions scoped to the repository
- Expires after the workflow run
- Cannot be used outside of GitHub Actions
- Is automatically rotated by GitHub
The workflow only requires:
- contents: write - To commit benchmark results
No additional secrets or tokens are needed.
If you have branch protection rules on main:
- Go to Settings → Branches
- Edit the branch protection rule for
main - Under Restrict who can push to matching branches
- Add
github-actions[bot]to the allowed list
Or disable the rule for automated commits:
- Uncheck Include administrators to allow bot commits
The workflow consumes GitHub Actions minutes. For public repositories, this is free and unlimited. For private repositories:
- Free tier: 2,000 minutes/month
- Each workflow run takes approximately 10-15 minutes total
- Daily runs = ~30 runs/month = ~300-450 minutes/month
To receive notifications when workflows fail:
- Go to your GitHub profile settings
- Click Notifications
- Under Actions, ensure Send notifications for failed workflows is enabled
Or set up custom notifications:
- Use GitHub's webhook integrations
- Add notification steps to the workflow (Slack, Discord, email, etc.)
After setup:
- ✅ Wait for the first scheduled run or trigger manually
- ✅ Verify the results are committed to the repository
- ✅ Check the updated README for benchmark tables
- ✅ Review the workflow logs for any issues
- ✅ Customize the schedule or Node.js versions if needed
For issues or questions:
- Check the AUTOMATION.md documentation
- Review the workflow logs in the Actions tab
- Open an issue in the repository
- Consult the GitHub Actions documentation