Skip to content

Commit

Permalink
Update build-project-actions.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
PouleR authored Dec 7, 2023
1 parent fd430ff commit 25de9cb
Showing 1 changed file with 25 additions and 5 deletions.
30 changes: 25 additions & 5 deletions .github/workflows/build-project-actions.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,34 @@ on: [push]
jobs:
phpunit:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- name: Install dependencies
uses: php-actions/composer@v6
- name: Checkout
uses: actions/checkout@v3

- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: '8.1'
extensions: mbstring
coverage: xdebug
tools: composer:v2, php-cs-fixer, phpunit

- name: Get composer cache directory
id: composer-cache
run: echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT

- name: Cache dependencies
uses: actions/cache@v3
with:
php_version: "8.1"
path: ${{ steps.composer-cache.outputs.dir }}
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
restore-keys: ${{ runner.os }}-composer-

- name: Install dependencies
run: composer install --prefer-dist

- name: Run PHPCS
run: ./vendor/bin/phpcs src -v --standard=PSR2 --exclude=Generic.Files.LineLength

- name: Run PHPUnit
run: ./vendor/bin/phpunit --coverage-text --colors

0 comments on commit 25de9cb

Please sign in to comment.