generationtux/php-healthz

View on GitHub
.github/workflows/test.yml

Summary

Maintainability
Test Coverage
name: test

on:
  push:
  pull_request:
    types:
      - opened
      - synchronize

jobs:
  build:
    name: PHP ${{ matrix.php }}

    runs-on: ${{ matrix.os }}

    strategy: 
      fail-fast: false
      matrix:
        php: [ "7.3", "7.4", "8.0", "8.1" ]
        os: [ ubuntu-latest ]

    steps:
    - name: Checkout
      uses: actions/checkout@master

    - name: Setup PHP
      uses: shivammathur/setup-php@master
      with:
        php-version: ${{ matrix.php }}

    - name: Cache Composer dependencies
      uses: actions/cache@v2
      with:
        path: /tmp/composer-cache
        key: ${{ runner.os }}-${{ hashFiles('**/composer.lock') }}

    - name: Install Dependencies
      uses: php-actions/composer@master
      with:
        php_version: ${{ matrix.php }}

    - name: Execute tests
      run: vendor/bin/phpunit