Skip to content

Add WPTV URL meta field #77

Add WPTV URL meta field

Add WPTV URL meta field #77

Workflow file for this run

name: Unit Tests
on:
pull_request:
paths:
- '**.php'
- '*.json'
- '*.xml.dist'
push:
paths:
- '**.php'
- '*.json'
- '*.xml.dist'
branches:
- master
jobs:
phpcs:
name: PHP CodeSniffer
runs-on: ubuntu-20.04
steps:
- name: Display PHP version
run: php -v
- uses: actions/checkout@v2
- name: Display PHP version
run: php -v
- name: Install dependencies
run: composer install --dev --prefer-dist --no-progress --no-suggest
unit-php:
name: PHP Unit Tests
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Cache node modules
uses: actions/cache@26968a09c0ea4f3e233fdddbafd1166051a095f6 # v2.1.4
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 14.x
uses: actions/setup-node@v1
with:
node-version: 14.x
- name: Npm install and build
run: |
npm ci
npm run build
- name: composer install
run: |
composer install
- name: Install WordPress
run: |
chmod -R 767 ./ # TODO: Possibly integrate in wp-env
npm run wp-env start
- name: Run unit tests
run: npm run test:unit-php
if: ${{ success() || failure() }}