|
1 | 1 | --- |
2 | 2 | name: phpcs |
3 | 3 | on: |
4 | | - - push |
5 | | - - pull_request |
| 4 | + - push |
| 5 | + - pull_request |
6 | 6 | jobs: |
7 | | - build: |
8 | | - runs-on: ubuntu-latest |
9 | | - steps: |
10 | | - - name: checkout |
11 | | - uses: actions/checkout@v4 |
12 | | - - name: setup php |
13 | | - uses: shivammathur/setup-php@v2 |
14 | | - with: |
15 | | - php-version: "7.2" |
16 | | - extensions: mbstring, simplexml, dom, openssl, curl, gd |
17 | | - - name: get composer cache directory |
18 | | - id: composer-cache |
19 | | - run: echo "directory=$(composer config cache-dir)" >> "$GITHUB_OUTPUT" |
20 | | - - name: cache composer dependencies |
21 | | - uses: actions/cache@v4 |
22 | | - with: |
23 | | - path: ${{ steps.composer-cache.outputs.directory }} |
24 | | - key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }} |
25 | | - restore-keys: ${{ runner.os }}-composer- |
26 | | - - name: install dependencies |
27 | | - run: composer install --no-progress --prefer-dist --optimize-autoloader |
28 | | - - name: check php version |
29 | | - run: php -v |
30 | | - - name: download phpcs |
31 | | - run: wget -O phpcs.phar https://cs.symfony.com/download/php-cs-fixer-v2.phar |
32 | | - - name: make phpcs executable |
33 | | - run: chmod +x phpcs.phar |
34 | | - - name: "style: apply coding style" |
35 | | - run: php phpcs.phar fix |
36 | | - - name: remove phpcs |
37 | | - run: rm -f phpcs.phar |
| 7 | + build: |
| 8 | + runs-on: ubuntu-latest |
| 9 | + steps: |
| 10 | + - name: checkout |
| 11 | + uses: actions/checkout@v4 |
| 12 | + - name: setup php |
| 13 | + uses: shivammathur/setup-php@v2 |
| 14 | + with: |
| 15 | + php-version: "7.2" |
| 16 | + extensions: mbstring, simplexml, dom, openssl, curl, gd |
| 17 | + - name: get composer cache directory |
| 18 | + id: composer-cache |
| 19 | + run: echo "directory=$(composer config cache-dir)" >> "$GITHUB_OUTPUT" |
| 20 | + - name: cache composer dependencies |
| 21 | + uses: actions/cache@v4 |
| 22 | + with: |
| 23 | + path: ${{ steps.composer-cache.outputs.directory }} |
| 24 | + key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }} |
| 25 | + restore-keys: ${{ runner.os }}-composer- |
| 26 | + - name: install dependencies |
| 27 | + run: composer install --no-progress --prefer-dist --optimize-autoloader |
| 28 | + - name: check php version |
| 29 | + run: php -v |
| 30 | + - name: download phpcs |
| 31 | + run: wget -O phpcs.phar https://cs.symfony.com/download/php-cs-fixer-v2.phar |
| 32 | + - name: make phpcs executable |
| 33 | + run: chmod +x phpcs.phar |
| 34 | + - name: "style: apply coding style" |
| 35 | + run: php phpcs.phar fix |
| 36 | + - name: remove phpcs |
| 37 | + run: rm -f phpcs.phar |
0 commit comments