Nightly Full Test Suite #97
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: 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@v6 | |
| - name: Set Up Node.js | |
| uses: actions/setup-node@v6 | |
| with: | |
| node-version: '24' | |
| - name: Cache node_modules | |
| id: cache-node-modules | |
| uses: actions/cache@v5 | |
| with: | |
| path: node_modules | |
| key: node-modules-${{ 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 |