This directory contains GitHub Actions workflows for automated testing, building, and releasing the Face Block Chromium Extension.
Triggers: Push to main or dev branches, Pull requests to main or dev
Runs on every push and PR to ensure code quality:
- Lint Job: Runs ESLint and Prettier format checks
- Test Job: Runs Playwright tests with xvfb (virtual display for extension testing)
- Build Job: Creates extension package ZIP file
Key Features:
- Uses
xvfb-runto provide virtual display for Chrome extension tests - Uploads test results and build artifacts
- Build job only runs if lint and test jobs pass
Triggers: Push to main, Pull requests to main
Similar to CI workflow but focused only on testing. Runs tests with 60-minute timeout.
Triggers: Push of version tags (e.g., v1.0.0)
Automates the release process when you tag a new version:
# Create and push a new release
git tag v1.0.0
git push origin v1.0.0Release Steps:
- β
Validates version consistency across:
package.jsonextension/manifest.json- Git tag
- π§ͺ Runs lint, format check, and full test suite
- π¦ Builds extension package
- π Validates package size (< 128MB Chrome Web Store limit)
- π Creates GitHub release with ZIP file attached
- π€ Uploads release artifact
Triggers: Daily at midnight UTC, Manual dispatch
Helps maintain issue and PR hygiene:
- Issues: Marked stale after 60 days, closed after 7 more days
- PRs: Marked stale after 30 days, closed after 7 more days
- Exemptions:
pinned,security,enhancement,bug,work-in-progress
Schedule: Weekly on Mondays at 9am UTC
Automatically creates PRs to update dependencies:
NPM Dependencies:
- Groups minor and patch updates together
- Separate groups for dev and production dependencies
- Labels:
dependencies,automated - Max 10 open PRs
GitHub Actions:
- Updates action versions
- Labels:
dependencies,github-actions,automated - Max 5 open PRs
The project uses Husky for Git hooks. Before every push, it automatically:
- β¨ Runs ESLint
- π¨ Checks Prettier formatting
- π§ͺ Runs full test suite
This ensures no broken code reaches the repository.
Note: If tests take too long, you can skip the hook with:
git push --no-verify origin branch-name(Not recommended for main/dev branches)
Chrome extensions cannot run in headless mode - they require a visible browser window. CI environments don't have
displays, so we use xvfb-run to provide a virtual X server.
run: xvfb-run --auto-servernum --server-args="-screen 0 1280x960x24" npm testThis creates a virtual 1280x960 display with 24-bit color for the tests to run in.
The project uses semantic versioning (MAJOR.MINOR.PATCH):
- MAJOR: Breaking changes
- MINOR: New features (backward compatible)
- PATCH: Bug fixes
-
Update version in both files:
npm version patch # or minor, or major # This updates both package.json and creates a git tag
-
Update manifest.json manually:
{ "version": "1.0.1" } -
Commit and tag:
git add extension/manifest.json git commit -m "chore: bump version to 1.0.1" git push origin dev git push origin v1.0.1 -
Release workflow automatically:
- Validates versions match
- Runs all tests
- Creates GitHub release
- Attaches extension ZIP
- Retention: 30 days
- Contents: Playwright test results and reports
- Access: Available in GitHub Actions run summary
- Retention: 90 days
- Contents: Extension ZIP file ready for Chrome Web Store
- Access: Attached to GitHub releases and CI runs
- Retention: Indefinite (attached to releases)
- Contents: Production-ready extension ZIP
- Access: GitHub Releases page
- Review Dependabot PRs: Pull Requests tab (filtered by
dependencieslabel)
- All workflows visible: Repository β Actions tab
- Status badges can be added to README
- Test results uploaded as artifacts
- View in Actions run summary
- Ensure local tests use the xvfb command (if on Linux)
- Check for timing issues (CI may be slower)
- Review test timeout settings in
playwright.config.js
Error: Version mismatch between package.json and manifest.json
- Update both
package.jsonandextension/manifest.jsonto same version - Ensure git tag matches versions (e.g., tag
v1.0.0for version1.0.0)
- Dependencies may have breaking changes
- Review changelog of updated packages
- Update code to match new API if needed
- Can close the PR to skip the update
Potential additions:
- Test coverage reporting with Codecov
- Performance benchmarking workflow
- Automatic Chrome Web Store submission
- Changelog generation from commits
- Release notes from PR descriptions