Skip to content

Pods 3.2.7

Pods 3.2.7 #1933

Workflow file for this run

name: 'JS Tests'
on:
pull_request:
paths:
- 'ui/js/**'
- 'package.json'
- 'webpack.*.js'
- 'jest-setup-wordpress-globals.js'
- 'jest.config.json'
- '.github/workflows/tests-js.yml'
jobs:
test:
strategy:
matrix:
suite: [ 'jest' ]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
with:
node-version: '16.x'
- name: Get npm cache directory
id: npm-cache-dir
shell: bash
run: echo "dir=$(npm config get cache)" >> ${GITHUB_OUTPUT}
- uses: actions/cache@v3
id: npm-cache # use this to check for `cache-hit` ==> if: steps.npm-cache.outputs.cache-hit != 'true'
with:
path: ${{ steps.npm-cache-dir.outputs.dir }}
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-node-
- name: Install dependencies
run: npm ci --force --legacy-peer-deps
- name: Run JS test suite
run: npm run ${{ matrix.suite }}