This repository was archived by the owner on Jul 18, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
42 lines (41 loc) · 1.57 KB
/
grumphp.yml
File metadata and controls
42 lines (41 loc) · 1.57 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
name: GrumPHP
on: push
jobs:
grumphp:
runs-on: ubuntu-latest
strategy:
matrix:
php_version:
- '7.2'
- '7.3'
- '7.4'
steps:
- uses: actions/checkout@v2
- name: Cache Composer Cache
uses: actions/cache@v2
with:
# npm cache files are stored in `~/.npm` on Linux/macOS
path: ~/.composer/cache
key: ${{ runner.os }}-build-composer-cache-${{ matrix.php_version }}-${{ hashFiles('**/composer.json') }}
restore-keys: |
${{ runner.os }}-build-composer-cache-${{ matrix.php_version }}-
${{ runner.os }}-build-composer-cache-
${{ runner.os }}-
- name: Install PHP
run: |
sudo add-apt-repository ppa:ondrej/php -y
sudo apt-get update
sudo apt-get install php${{ matrix.php_version }}
- name: Install Extensions
run: sudo apt-get install php${{ matrix.php_version }}-json
- name: Install Composer
run: |
php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');"
php -r "if (hash_file('sha384', 'composer-setup.php') === 'e5325b19b381bfd88ce90a5ddb7823406b2a38cff6bb704b0acc289a09c8128d4a8ce2bbafcd1fcbdc38666422fe2806') { echo 'Installer verified'; } else { echo 'Installer corrupt'; unlink('composer-setup.php'); } echo PHP_EOL;"
php composer-setup.php
php -r "unlink('composer-setup.php');"
- name: Composer install
run: php composer.phar install
- name: GrumPHP
run: |
vendor/bin/grumphp run