docs
Sync with GitHub Actions
Automate incremental project syncs after validating the repository with the local CLI.
Updated 2026-06-06
Before adding automation
Run at least one local sync first. This confirms framework detection and creates the initial history before CI becomes responsible for updates.
Add the action
Create a workflow that checks out the full Git history and runs the published action:
name: Sync Tests to Chronicle
on:
push:
branches: [main]
jobs:
sync:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
with:
fetch-depth: 0
- uses: TestChronicle/test-chronicle-agent@v0
with:
API_KEY: ${{ secrets.API_KEY }}
PROJECT_ID: ${{ secrets.PROJECT_ID }}
Add API_KEY and PROJECT_ID as GitHub Actions secrets. The complete checkout is required because the agent reads Git history rather than only the latest commit.
Set the workflow token to read-only repository access:
permissions:
contents: read
The action runs against the checkout and does not require a GitHub App or write access to repository contents. See Security and trust for the full permission rationale and data inventory.
Choose a workflow event
The documented workflow syncs after changes reach the main branch. Adjust the branch and trigger to match the point at which your project history should update.
Incremental behaviour
After a successful sync, Test Chronicle stores the last synced commit hash. The next run requests that marker and walks forward from it, while refreshing the current snapshot of test files and test cases.
If a workflow cannot find its expected tests, check the checkout depth, project secrets, and dashboard sync settings.
Related reading
See it in Test Chronicle
Inspect a populated project or start tracking your own repository history.
Create a free account