Skip to content

Bump actions/checkout from 3 to 4 #43

Bump actions/checkout from 3 to 4

Bump actions/checkout from 3 to 4 #43

Workflow file for this run

name: 'Run tests'
on:
pull_request:
paths:
- '**/*.php'
- '.github/workflows/*'
push:
paths:
- '**/*.php'
- '.github/workflows/*'
jobs:
cs:
name: 'Check coding style'
runs-on: 'ubuntu-22.04'
steps:
- name: 'Checkout current revision'
uses: 'actions/checkout@v4'
- name: 'Setup PHP'
uses: 'shivammathur/setup-php@v2'
with:
php-version: '8.1'
tools: 'composer'
extensions: 'mbstring, intl'
coverage: 'none'
- name: 'Discover Composer cache directory'
id: 'cachedir'
run: 'echo "::set-output name=path::$(composer global config cache-dir)"'
- name: 'Share Composer cache across runs'
uses: 'actions/cache@v3'
with:
path: '${{ steps.cachedir.outputs.path }}'
key: "composer-${{ github.job }}-${{ hashFiles('**/composer.json') }}"
restore-keys: |
composer-${{ github.job }}-
composer-
- name: 'Install dependencies with Composer'
run: 'composer install --prefer-dist --no-interaction'
- name: 'Run PHP CodeSniffer'
run: 'composer run-script cs-check -- -n'
stan:
name: 'Static code analyzer'
runs-on: 'ubuntu-22.04'
continue-on-error: true
steps:
- name: 'Checkout current revision'
uses: 'actions/checkout@v4'
- name: 'Setup PHP'
uses: 'shivammathur/setup-php@v2'
with:
php-version: '8.1'
tools: 'composer'
extensions: 'mbstring, intl'
coverage: 'none'
- name: 'Discover Composer cache directory'
id: 'cachedir'
run: 'echo "::set-output name=path::$(composer global config cache-dir)"'
- name: 'Share Composer cache across runs'
uses: 'actions/cache@v3'
with:
path: '${{ steps.cachedir.outputs.path }}'
key: "composer-${{ github.job }}-${{ hashFiles('**/composer.json') }}"
restore-keys: |
composer-${{ github.job }}-
composer-
- name: 'Install dependencies with Composer'
run: 'composer install --prefer-dist --no-interaction'
- name: 'Run PHP STAN'
run: 'composer run-script stan'