Skip to content

Update to 2.2.1

Update to 2.2.1 #91

Workflow file for this run

name: PR Actions
on:
pull_request:
push:
branches: [ master ]
jobs:
test:
name: Lint & Test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: '7.4'
coverage: none
tools: composer, cs2pr
- name: Get Composer cache directory
id: composer-cache
run: echo "::set-output name=dir::$(composer config cache-files-dir)"
- name: Cache Composer vendor directory
uses: actions/cache@v2
with:
path: ${{ steps.composer-cache.outputs.dir }}
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
restore-keys: |
${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
- name: Cache node modules
uses: actions/cache@v2
env:
cache-name: cache-node-modules
with:
# npm cache files are stored in `~/.npm` on Linux/macOS
path: ~/.npm
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-build-${{ env.cache-name }}-
${{ runner.os }}-build-
${{ runner.os }}-
- name: Use Node.js 16.x
uses: actions/setup-node@v1
with:
node-version: 16.x
- name: Log debug information
run: |
php --version
composer --version
node --version
npm --version
- name: Validate composer.json and composer.lock files
run: composer validate
- name: Install PHP Dependencies
run: composer install --no-progress --optimize-autoloader
- name: Run linting
run: composer run lint
- name: Install dependencies
run: npm install
- name: Install WordPress
run: |
chmod -R 767 ./
npm run wp-env start
- name: Run the tests
run: npm run test