# NOTE: Changes to this file should also be applied to './test.yml' and './test-translations.yml' name: Node.js Tests - Windows on: workflow_dispatch: schedule: - cron: "50 19 * * *" # once a day at 19:50 UTC / 11:50 PST env: CI: true jobs: test: runs-on: windows-latest strategy: fail-fast: false matrix: test-group: [content, meta, rendering, routing, unit, links-and-images] steps: - name: Check out repo uses: actions/checkout@a81bbbf8298c0fa03ea29cdc473d45769f953675 - name: Setup node uses: actions/setup-node@56899e050abffc08c2b3b61f3ec6a79a9dc3223d with: node-version: 14.x - name: Get npm cache directory id: npm-cache run: | echo "::set-output name=dir::$(npm config get cache)" - name: Cache node modules uses: actions/cache@d1255ad9362389eac595a9ae406b8e8cb3331f16 with: path: ${{ steps.npm-cache.outputs.dir }} key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }} restore-keys: | ${{ runner.os }}-node- - name: Install dependencies run: npm ci - name: Run build script run: npm run build - name: Run tests run: npx jest tests/${{ matrix.test-group }}/