Sync zkVM Test Monitor Data #83
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Sync zkVM Test Monitor Data | |
| on: | |
| # Run daily at 06:00 UTC | |
| schedule: | |
| - cron: '0 6 * * *' | |
| # Allow manual trigger | |
| workflow_dispatch: | |
| # Trigger when Cody's repo dispatches an event | |
| repository_dispatch: | |
| types: [test-monitor-updated] | |
| permissions: | |
| contents: write | |
| pull-requests: write | |
| jobs: | |
| sync-data: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout website repo | |
| uses: actions/checkout@v4 | |
| - name: Fetch test monitor results | |
| env: | |
| GH_TOKEN: ${{ github.token }} | |
| run: | | |
| mkdir -p src/data/test-monitor-raw | |
| ZKVMS="zisk jolt r0vm openvm pico airbender lambdavm" | |
| for zkvm in $ZKVMS; do | |
| for suite in act4-standard act4-full; do | |
| echo "Fetching ${zkvm} ${suite}..." | |
| gh api "repos/eth-act/zkevm-test-monitor/contents/data/history/${zkvm}-${suite}.json" \ | |
| --jq '.content' 2>/dev/null | base64 -d > "src/data/test-monitor-raw/${zkvm}-${suite}.json" 2>/dev/null || true | |
| done | |
| done | |
| - name: Transform data for website | |
| run: | | |
| node scripts/transform-test-data.js | |
| - name: Check for changes | |
| id: changes | |
| run: | | |
| git diff --quiet src/data/ && echo "changed=false" >> $GITHUB_OUTPUT || echo "changed=true" >> $GITHUB_OUTPUT | |
| - name: Commit and push changes | |
| if: steps.changes.outputs.changed == 'true' | |
| run: | | |
| git config user.name "github-actions[bot]" | |
| git config user.email "github-actions[bot]@users.noreply.github.com" | |
| git add src/data/test-monitor-summary.json | |
| git commit -m "data: sync zkVM test monitor results $(date -u +%Y-%m-%d)" | |
| git push |