Skip to content

Merge pull request #345 from IO500/rename-submission-to-benchmark #22

Merge pull request #345 from IO500/rename-submission-to-benchmark

Merge pull request #345 from IO500/rename-submission-to-benchmark #22

Workflow file for this run

name: CI
on:
pull_request:
push:
branches: [main]
jobs:
php-lint:
name: PHP lint (phpcs + syntax)
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: '8.2'
extensions: mbstring, intl, pdo_mysql
coverage: none
tools: composer:v2
- name: Get composer cache directory
id: composer-cache
run: echo "dir=$(composer config cache-files-dir)" >> "$GITHUB_OUTPUT"
- name: Cache composer dependencies
uses: actions/cache@v4
with:
path: ${{ steps.composer-cache.outputs.dir }}
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
restore-keys: ${{ runner.os }}-composer-
- name: Install composer dependencies
run: composer install --prefer-dist --no-progress --no-interaction
- name: Run phpcs (CakePHP coding standard)
run: composer cs-check
- name: PHP syntax check (php -l)
run: |
set -e
find src tests config templates -type f -name '*.php' -print0 \
| xargs -0 -n1 -P4 php -l > /dev/null
yaml-lint:
name: YAML lint
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: '3.12'
- name: Install yamllint
run: pip install --quiet yamllint
- name: Lint workflow and config YAML
run: yamllint -d relaxed .github/ config/