Skip to content

Instantly share code, notes, and snippets.

@dinhquochan
Created April 16, 2020 07:40
Show Gist options
  • Select an option

  • Save dinhquochan/8d5b66ac2cca8c0424ebf275e22b9e6d to your computer and use it in GitHub Desktop.

Select an option

Save dinhquochan/8d5b66ac2cca8c0424ebf275e22b9e6d to your computer and use it in GitHub Desktop.
Github Actions Config for Laravel Package
name: tests
on: [push]
jobs:
tests:
runs-on: ubuntu-latest
strategy:
fail-fast: true
matrix:
php: [7.2, 7.3, 7.4]
stability: [prefer-lowest, prefer-stable]
name: P${{ matrix.php }} - S${{ matrix.stability }}
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Cache dependencies
uses: actions/cache@v1
with:
path: ~/.composer/cache/files
key: dependencies-php-${{ matrix.php }}-composer-${{ hashFiles('composer.json') }}
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
extensions: dom, curl, libxml, mbstring, zip, pcntl, gd
coverage: none
- name: Install dependencies
run: composer update --${{ matrix.stability }} --prefer-dist --no-interaction --no-suggest
- name: Execute tests
run: vendor/bin/phpunit --verbose
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment