Skip to content

Merge pull request #57 from a-menshchikov/2.0 #196

Merge pull request #57 from a-menshchikov/2.0

Merge pull request #57 from a-menshchikov/2.0 #196

Workflow file for this run

name: Audit
on: [ push, pull_request ]
jobs:
audit:
name: Audit
strategy:
matrix:
php-version: [ '8.2', '8.3' ]
fail-fast: false
runs-on: ubuntu-latest
steps:
- name: Checkout (Push)
uses: actions/checkout@v4
if: github.event_name == 'push'
with:
fetch-depth: 0
- name: Checkout (PR)
uses: actions/checkout@v4
if: github.event_name == 'pull_request'
with:
ref: ${{ github.event.pull_request.head.sha }}
fetch-depth: 0
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php-version }}
tools: composer:v2
coverage: xdebug
env:
fail-fast: true
- name: Get composer cache directory
id: composer-cache
run: echo "DIR=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT
- name: Cache dependencies
uses: actions/cache@v4
with:
path: ${{ steps.composer-cache.outputs.DIR }}
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.json') }}
restore-keys: ${{ runner.os }}-composer-
- name: Install dependencies
run: composer install --no-interaction
- name: Auditor
uses: docker://nbgrp/auditor:0.26.0
- name: Tests
run: vendor/bin/phpunit
- name: Codecov
uses: codecov/codecov-action@v4
with:
token: ${{ secrets.CODECOV_TOKEN }}
files: ./clover.xml