Skip to content

updated ai style

updated ai style #8

name: Daily Testnet TS
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 }}
run: |
SUMMARY_FILE="daily-testnet-ts-ai-summary.md"
if [ -f "$SUMMARY_FILE" ]; then
SUMMARY=$(cat "$SUMMARY_FILE")
else
SUMMARY="AI summary unavailable."
fi
curl -sS -X POST "https://api.telegram.org/bot${TELEGRAM_BOT_TOKEN}/sendMessage" \
-d chat_id="${TELEGRAM_CHAT_ID}" \
--data-urlencode text="Daily Testnet TS
Status: ${STATUS}
Branch: ${{ github.ref_name }}
Run: ${RUN_URL}
${SUMMARY}"

Check failure on line 87 in .github/workflows/daily-testnet-ts.yml

View workflow run for this annotation

GitHub Actions / .github/workflows/daily-testnet-ts.yml

Invalid workflow file

You have an error in your yaml syntax on line 87