dev: Improve quality of the development environment #132
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Linters | |
on: | |
push: | |
branches: [ main ] | |
pull_request: | |
branches: [ main ] | |
env: | |
NO_DOCKER: true | |
jobs: | |
build: | |
runs-on: ${{ matrix.operating-system }} | |
strategy: | |
matrix: | |
operating-system: [ubuntu-22.04] | |
php-versions: ['8.2', '8.3'] | |
name: PHP ${{ matrix.php-versions }} CI on ${{ matrix.operating-system }} | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-node@v4 | |
with: | |
node-version: 20 | |
cache: 'npm' | |
- name: Setup PHP | |
uses: shivammathur/setup-php@v2 | |
with: | |
php-version: ${{ matrix.php-versions }} | |
coverage: xdebug | |
extensions: intl, gettext, pcntl, gd, pdo, pdo_pgsql | |
ini-values: browscap=${{ github.workspace }}/docker/development/lite_php_browscap.ini | |
- name: Setup locales | |
run: | | |
sudo apt-get install locales | |
sudo locale-gen fr_FR.UTF-8 en_GB.UTF-8 | |
- 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 dependencies | |
run: make install | |
- name: Run the linters | |
run: make lint |