PHP Classes

File: .github/workflows/test.yml

Recommend this page to a friend!
  Classes of Rodolfo Berrios Arce  >  XR PHP Debugger Online  >  .github/workflows/test.yml  >  Download  
File: .github/workflows/test.yml
Role: Auxiliary data
Content type: text/plain
Description: Auxiliary data
Class: XR PHP Debugger Online
Debug PHP code using a Web interface
Author: By
Last change:
Date: 3 months ago
Size: 2,143 bytes
 

Contents

Class file image Download
name: Test

on: [push]

jobs:
  build:
    runs-on: ${{ matrix.operating-system }}
    strategy:
      matrix:
        operating-system: [ubuntu-20.04]
        php-versions: ["8.0", "8.1"]
    env:
      extensions: pcov
      tools: composer
      ini-values: pcov.directory=src
      key: cache-1641424177283
    name: PHP ${{ matrix.php-versions }} test on ${{ matrix.operating-system }}
    steps:
      - name: Checkout
        uses: actions/checkout@v2

      - name: Setup cache environment
        if: ${{ !env.ACT }}
        id: extcache
        uses: shivammathur/cache-extensions@v1
        with:
          php-version: ${{ matrix.php-versions }}
          extensions: ${{ env.extensions }}
          key: ${{ env.key }}

      - name: Cache extensions
        if: ${{ !env.ACT }}
        uses: actions/cache@v2
        with:
          path: ${{ steps.extcache.outputs.dir }}
          key: ${{ steps.extcache.outputs.key }}
          restore-keys: ${{ steps.extcache.outputs.key }}

      - name: Setup PHP
        uses: shivammathur/setup-php@v2
        with:
          php-version: ${{ matrix.php-versions }}
          extensions: ${{ env.extensions }}
          ini-values: ${{ env.ini-values }}
          coverage: pcov
          tools: ${{ env.tools }}
        env:
          fail-fast: true

      - name: Setup problem matchers for PHPUnit
        run: echo "::add-matcher::${{ runner.tool_cache }}/phpunit.json"

      - name: Validate composer
        run: composer validate

      - name: Get composer cache directory
        id: composer-cache
        run: echo "::set-output name=dir::$(composer config cache-files-dir)"

      - name: Cache dependencies
        uses: actions/cache@v2
        with:
          path: ${{ steps.composer-cache.outputs.dir }}
          key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
          restore-keys: ${{ runner.os }}-composer-

      - name: Install dependencies
        run: composer install --prefer-dist --no-progress --classmap-authoritative --ignore-platform-reqs

      - name: Run tests with phpunit
        run: vendor/bin/phpunit -c phpunit-report.xml
For more information send a message to info at phpclasses dot org.