-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
00d652e
commit 3fa379c
Showing
1 changed file
with
39 additions
and
0 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
name: code-style | ||
|
||
on: [push] | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
|
||
strategy: | ||
matrix: | ||
php-version: [7.3, 7.4] | ||
|
||
steps: | ||
- uses: actions/checkout@v1 | ||
|
||
- name: Setup PHP ${{ matrix.php-version }} | ||
uses: shivammathur/setup-php@v1 | ||
with: | ||
php-version: ${{ matrix.php-version }} | ||
extensions: mbstring | ||
|
||
- name: Get Composer cache directory | ||
id: composer-cache | ||
run: | | ||
echo "::set-output name=path::$(composer config cache-files-dir)" | ||
- uses: actions/cache@v1 | ||
with: | ||
path: ${{ steps.composer-cache.outputs.path }} | ||
key: ${{ runner.os }}-composer-${{ matrix.php-version }}-${{ hashFiles('**/composer.lock') }} | ||
restore-keys: | | ||
${{ runner.os }}-composer-${{ matrix.php-version }}- | ||
${{ runner.os }}-composer- | ||
- name: Install Composer dependencies | ||
run: php${{ matrix.php-version }} $(which composer) install --prefer-dist --no-progress --no-suggest | ||
|
||
- name: Run Easy Coding Standard | ||
run: php${{ matrix.php-version }} vendor/bin/ecs check src tests |