-
Notifications
You must be signed in to change notification settings - Fork 1
48 lines (40 loc) · 1.08 KB
/
scheduled-test.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
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