Daily Testnet TS (master) #21
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: Daily Testnet TS | |
| run-name: Daily Testnet TS (${{ github.ref_name }}) | |
| on: | |
| schedule: | |
| - cron: "0 8 * * *" | |
| workflow_dispatch: | |
| concurrency: | |
| group: daily-testnet-ts | |
| cancel-in-progress: false | |
| jobs: | |
| daily-testnet-ts: | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 45 | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| - name: Set up pnpm | |
| uses: pnpm/action-setup@v4 | |
| - name: Set up Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: 22 | |
| cache: pnpm | |
| - name: Install JavaScript dependencies | |
| run: pnpm install --frozen-lockfile | |
| - name: Run daily testnet TypeScript suite | |
| env: | |
| TESTNET_PRIVATE_KEY: ${{ secrets.TESTNET_PRIVATE_KEY }} | |
| TESTNET_SENDER: ${{ secrets.TESTNET_SENDER }} | |
| TESTNET_TOKEN_ID: ${{ vars.TESTNET_TOKEN_ID }} | |
| run: | | |
| set -euo pipefail | |
| ./script/run-testnet-daily-ts.sh 2>&1 | tee daily-testnet-ts.log | |
| - name: Upload daily testnet TypeScript log | |
| if: always() | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: daily-testnet-ts-log | |
| path: daily-testnet-ts.log | |
| - name: Analyze run with AI | |
| if: always() | |
| env: | |
| OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }} | |
| LOG_PATH: daily-testnet-ts.log | |
| OUTPUT_PATH: daily-testnet-ts-ai-summary.md | |
| run: | | |
| set -euo pipefail | |
| node ./script/analyze-testnet-ts-run.mjs | tee daily-testnet-ts-ai-summary.md | |
| - name: Upload AI summary | |
| if: always() | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: daily-testnet-ts-ai-summary | |
| path: daily-testnet-ts-ai-summary.md | |
| - name: Notify Telegram | |
| if: always() | |
| env: | |
| TELEGRAM_BOT_TOKEN: ${{ secrets.TELEGRAM_BOT_TOKEN }} | |
| TELEGRAM_CHAT_ID: ${{ secrets.TELEGRAM_CHAT_ID }} | |
| RUN_URL: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }} | |
| STATUS: ${{ job.status }} | |
| BRANCH: ${{ github.ref_name }} | |
| LOG_PATH: daily-testnet-ts.log | |
| SUMMARY_PATH: daily-testnet-ts-ai-summary.md | |
| REPORT_TITLE: Daily Testnet TS | |
| REPORT_MODE: testnet | |
| REPORT_ETH_LABEL: hoodi-reth | |
| run: | | |
| MESSAGE=$(node ./script/format-telegram-test-report.mjs) | |
| curl -sS -X POST "https://api.telegram.org/bot${TELEGRAM_BOT_TOKEN}/sendMessage" \ | |
| -d chat_id="${TELEGRAM_CHAT_ID}" \ | |
| --data-urlencode "text=${MESSAGE}" |