Ensure we install correct version of node #365
This file contains 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: Linting | |
on: | |
push: | |
branches: | |
- develop | |
- trunk | |
pull_request: | |
branches: | |
- develop | |
jobs: | |
eslint: | |
name: eslint | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: install node | |
uses: actions/setup-node@v4 | |
with: | |
node-version-file: '.nvmrc' | |
- uses: actions/cache@v4 | |
id: cache-node | |
with: | |
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }} | |
path: | | |
node_modules | |
~/.cache | |
~/.npm | |
- name: npm install | |
run: npm ci | |
- name: eslint | |
run: npm run lint:js | |
phpcs: | |
name: phpcs | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: WPCS check | |
uses: 10up/wpcs-action@stable | |
with: | |
standard: 'WordPress' |