|
1 | 1 | # https://help.github.com/en/categories/automating-your-workflow-with-github-actions |
2 | 2 |
|
3 | 3 | on: |
4 | | - - pull_request |
5 | | - - push |
| 4 | + - pull_request |
| 5 | + - push |
6 | 6 |
|
7 | 7 | name: "Continuous Integration" |
8 | 8 |
|
9 | 9 | jobs: |
10 | | - grumphp: |
11 | | - name: "Grumphp" |
12 | | - |
13 | | - runs-on: ubuntu-latest |
14 | | - |
15 | | - strategy: |
16 | | - matrix: |
17 | | - php-binary: |
18 | | - - php7.1 |
19 | | - - php7.2 |
20 | | - - php7.3 |
21 | | - |
22 | | - steps: |
23 | | - - name: "Checkout" |
24 | | - uses: actions/checkout@master |
25 | | - with: |
26 | | - fetch-depth: 1 |
27 | | - |
28 | | - - name: "Composer install" |
29 | | - run: ${{ matrix.php-binary }} $(which composer) install --no-interaction --no-progress --no-suggest |
30 | | - |
31 | | - - name: "Composer install lowest dependencies" |
32 | | - if: matrix.dependencies == 'lowest' |
33 | | - run: ${{ matrix.php-binary }} $(which composer) update --no-interaction --no-progress --no-suggest --prefer-lowest |
34 | | - |
35 | | - - name: "Install Graphviz" |
36 | | - run: sudo apt-get install graphviz |
37 | | - |
38 | | - - name: "Run Grumphp" |
39 | | - run: ${{ matrix.php-binary }} vendor/bin/grumphp run |
40 | | - env: |
41 | | - STRYKER_DASHBOARD_API_KEY: ${{ secrets.STRYKER_DASHBOARD_API_KEY }} |
42 | | - |
43 | | - - name: "Scrutinizer" |
44 | | - run: wget https://scrutinizer-ci.com/ocular.phar && php ocular.phar code-coverage:upload --format=php-clover build/logs/clover.xml |
| 10 | + run: |
| 11 | + name: "Grumphp" |
| 12 | + runs-on: ${{ matrix.operating-system }} |
| 13 | + strategy: |
| 14 | + fail-fast: false |
| 15 | + matrix: |
| 16 | + operating-system: [ubuntu-latest, windows-latest, macOS-latest] |
| 17 | + php-versions: ['7.1', '7.2', '7.3', '7.4'] |
| 18 | + |
| 19 | + steps: |
| 20 | + - name: Checkout |
| 21 | + uses: actions/checkout@master |
| 22 | + with: |
| 23 | + fetch-depth: 1 |
| 24 | + |
| 25 | + - name: Install PHP |
| 26 | + uses: shivammathur/setup-php@master |
| 27 | + with: |
| 28 | + php-version: ${{ matrix.php-versions }} |
| 29 | + extensions: mbstring,xdebug |
| 30 | + - name: Get Composer Cache Directory |
| 31 | + id: composer-cache |
| 32 | + run: echo "::set-output name=dir::$(composer config cache-files-dir)" |
| 33 | + |
| 34 | + - name: Cache dependencies |
| 35 | + uses: actions/cache@v1 |
| 36 | + with: |
| 37 | + path: ${{ steps.composer-cache.outputs.dir }} |
| 38 | + key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.json') }} |
| 39 | + restore-keys: ${{ runner.os }}-composer- |
| 40 | + |
| 41 | + - name: Install dependencies |
| 42 | + run: composer install --no-progress --no-suggest --prefer-dist --optimize-autoloader |
| 43 | + |
| 44 | + - name: Run Grumphp |
| 45 | + run: vendor/bin/grumphp run --no-ansi -n |
| 46 | + env: |
| 47 | + STRYKER_DASHBOARD_API_KEY: ${{ secrets.STRYKER_DASHBOARD_API_KEY }} |
| 48 | + |
| 49 | + - name: Send PSALM data |
| 50 | + run: vendor/bin/psalm --shepherd --stats |
| 51 | + continue-on-error: true |
| 52 | + |
| 53 | + - name: Scrutinizer |
| 54 | + run: | |
| 55 | + wget https://scrutinizer-ci.com/ocular.phar |
| 56 | + php ocular.phar code-coverage:upload --format=php-clover build/logs/clover.xml |
| 57 | + continue-on-error: true |
0 commit comments