Skip to content

Feature/test ci

Feature/test ci #10

Workflow file for this run

name: Unit/Integration tests
on:
pull_request:
branches:
- trunk
- develop
- branch-*
- feature/*
- v1
jobs:
run:
runs-on: ${{ matrix.operating-system }}
strategy:
fail-fast: true
matrix:
operating-system: [ubuntu-24.04]
php-versions: ['7.4']
wp-versions: ['latest']
name: WP ${{ matrix.wp-versions }} with PHP ${{ matrix.php-versions }} on ${{ matrix.operating-system }}.
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Setup NPM
uses: actions/setup-node@v4
with:
node-version: 'lts/*'
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php-versions }}
coverage: none # XDebug can be enabled here 'coverage: xdebug'
tools: composer:v2, phpunit
- name: Npm install
run: npm ci
- name: Get composer cache directory
id: composercache
run: echo "::set-output name=dir::$(composer config cache-files-dir)"
- name: Cache dependencies
uses: actions/cache@v2
with:
path: ${{ steps.composercache.outputs.dir }}
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.json') }}
restore-keys: ${{ runner.os }}-composer-
- name: Install dependencies
run: composer install --prefer-dist --no-interaction
- name: Starting WP ENV
run: npm run wp-env:start
- name: Test
run: npm run run-tests