-
Notifications
You must be signed in to change notification settings - Fork 0
65 lines (55 loc) · 1.75 KB
/
Copy pathnightly-tests.yml
File metadata and controls
65 lines (55 loc) · 1.75 KB
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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
name: Nightly Full Test Suite
on:
schedule:
# Run at 6:00 AM UTC (1:00 AM EST) daily
- cron: '0 6 * * *'
workflow_dispatch:
env:
CI: true
# Workflow-level GITHUB_TOKEN scope. No job in this file pushes code,
# comments on PRs, or creates releases; all writes to external services
# use their own non-GITHUB_TOKEN secrets. contents:read is the safe floor.
permissions:
contents: read
jobs:
full-unit-tests:
runs-on: ubuntu-latest
steps:
- name: Checkout Code
uses: actions/checkout@v7
- name: Set Up Node.js
uses: actions/setup-node@v7
with:
node-version: '24'
- name: Cache node_modules
id: cache-node-modules
uses: actions/cache@v6
with:
path: |
node_modules
apps/*/node_modules
jobs/*/node_modules
shared/*/node_modules
key: node-modules-v2-${{ runner.os }}-node24-${{ hashFiles('package-lock.json') }}
- name: Validate cached node_modules
id: validate-cache
if: steps.cache-node-modules.outputs.cache-hit == 'true'
run: |
if npm ls --depth=0 >/dev/null 2>&1; then
echo "valid=true" >> $GITHUB_OUTPUT
else
echo "valid=false" >> $GITHUB_OUTPUT
rm -rf node_modules
fi
- name: Install Dependencies
if: steps.cache-node-modules.outputs.cache-hit != 'true' || steps.validate-cache.outputs.valid == 'false'
run: npm ci
- name: Run full unit test suite
run: npm run test:unit:coverage
- name: Upload Coverage
uses: actions/upload-artifact@v7
if: always()
with:
name: nightly-unit-test-coverage
path: coverage/
retention-days: 7