Skip to content

Scheduled Test Runner #212

Scheduled Test Runner

Scheduled Test Runner #212

name: Scheduled Test Runner
on:
schedule:
# Runs at 2 AM EST±DST every day
- cron: '0 7 * * *'
workflow_dispatch:
jobs:
test-and-report:
runs-on: ubuntu-latest
env:
ACCESS_TOKEN: ${{ secrets.PERSONAL_ACCESS_TOKEN || secrets.GITHUB_TOKEN }}
steps:
- name: Log Token Type
run: |
if [ "${{ env.ACCESS_TOKEN }}" = "${{ secrets.GITHUB_TOKEN }}" ]; then
echo "🗝️ Authenticated with GitHub Token"
else
echo "🔑 Authenticated with Personal Access token"
fi
- name: Checkout code
uses: actions/checkout@v4
- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: '22'
- name: Install pnpm
run: npm install -g pnpm
- name: Install dependencies
run: pnpm install
- name: Build
run: pnpm build
- name: Run tests
id: tests
run: |
if pnpm test; then
echo "✅ Tests passed"
else
echo "🐛 Tests failed"
exit 1
fi