Files
crater/.github/workflows/ci.yaml
Mwikala Kangwa 9e98a96d61 Implement PHP CS Fixer and a coding standard to follow (#471)
* Create PHP CS Fixer config and add to CI workflow

* Run php cs fixer on project

* Add newline at end of file

* Update to use PHP CS Fixer v3

* Run v3 config on project

* Run seperate config in CI
2021-05-21 17:27:51 +05:30

38 lines
875 B
YAML

name: CI
on: [push, pull_request]
jobs:
build-test:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
php: ['7.4', '8.0']
name: PHP ${{ matrix.php }}
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Install dependencies
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
extensions: exif
- name: Install PHP 7 dependencies
run: composer update --no-interaction --no-progress
if: "matrix.php < 8"
- name: Install PHP 8 dependencies
run: composer update --ignore-platform-req=php --no-interaction --no-progress
if: "matrix.php >= 8"
- name: Check coding style
run: ./vendor/bin/php-cs-fixer fix -v --dry-run --using-cache=no --config=.php-cs-fixer.ci.php
- name: Unit Tests
run: php ./vendor/bin/pest