Skip to content

Daily Health Check

Daily Health Check #64

Workflow file for this run

name: Daily Health Check
on:
schedule:
- cron: "0 8 * * *"
workflow_dispatch:
env:
INFURA_API_KEY: ${{ secrets.INFURA_API_KEY }}
PIMLICO_API_KEY: ${{ secrets.PIMLICO_API_KEY }}
jobs:
health-check:
runs-on: ubuntu-latest
timeout-minutes: 15
defaults:
run:
# Sets the default directory for all 'run' steps in this job
working-directory: ./cohort-perf-tool
permissions:
contents: write
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 20
cache: npm
# where to find the lockfile for caching
cache-dependency-path: cohort-perf-tool/package-lock.json
- run: npm ci
- name: Test Cohort 1
run: |
npx tsx src/runner.ts \
--config=configs/daily-cohort1.yml \
--json 2>&1 | tee cohort1-output.txt
- name: Test Cohort 3
run: |
npx tsx src/runner.ts \
--config=configs/daily-cohort3.yml \
--json 2>&1 | tee cohort3-output.txt
- name: Test Cohort 4 (mainnet)
run: |
npx tsx src/runner.ts \
--config=configs/daily-cohort4.yml \
--json 2>&1 | tee cohort4-output.txt
- name: Generate Reports
run: |
for f in results/data/*.json; do
npx tsx src/report.ts "$f"
done
- name: Upload Reports
uses: actions/upload-artifact@v4
with:
name: taco-perf-daily-${{ github.run_number }}
path: cohort-perf-tool/results/
retention-days: 90
- name: Prepare Pages
run: bash scripts/prepare-pages.sh daily
- name: Deploy to GitHub Pages
uses: peaceiris/actions-gh-pages@v4
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./cohort-perf-tool/_site
keep_files: true
- name: Post to Discord
if: always()
env:
DISCORD_WEBHOOK_URL: ${{ secrets.DISCORD_WEBHOOK_URL }}
run: python3 scripts/post-discord.py cohort1-output.txt cohort3-output.txt cohort4-output.txt