Skip to content

Dev local tests

Dev local tests #9

Workflow file for this run

name: PHP Unit Tests
env:
PHP_VER: "7.4"
COMPOSER_VER: "2.5.1"
on:
push:
branches: [ "master", "main", "dev" ]
pull_request:
types: [synchronize, opened, reopened]
jobs:
php-ci:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Cache Composer dependencies
uses: actions/cache@v3
with:
path: /tmp/composer-cache
key: ${{ runner.os }}-${{ hashFiles('**/composer.lock') }}
- uses: php-actions/composer@v6
with:
php_version: ${{ env.PHP_VER }}
version: ${{ env.COMPOSER_VER }}
- name: Get PHPCS Cache
id: phpcs-cache
run: |
echo "file=.phpcs.cache" >> $GITHUB_OUTPUT
- uses: actions/cache@v3
with:
path: ${{ steps.phpcs-cache.outputs.file }}
key: ${{ runner.os }}-phpcs-${{ hashFiles('**/.phpcs.cache') }}
restore-keys: |
${{ runner.os }}-phpcs-
- name: Run PHPCS
run: composer run phpcs
- name: Run UnitTests
run: composer run phpunit