tkhamez/slim-role-auth

View on GitHub
.github/workflows/test.yml

Summary

Maintainability
Test Coverage
name: test

on: [push]

jobs:
  test:
    runs-on: ubuntu-22.04
    strategy:
      matrix:
        php-versions: ['7.4', '8.0', '8.1', '8.2', '8.3']
    steps:
      - name: Checkout
        uses: actions/checkout@v3
      - name: Setup PHP
        uses: shivammathur/setup-php@v2
        with:
          php-version: ${{ matrix.php-versions }}
          extensions: gmp
          tools: composer:v2
      - name: Install
        run: composer install
      - name: Test
        if: ${{ matrix.php-versions != '8.2' }}
        run: vendor/bin/phpunit
      - name: Test & publish code coverage
        if: ${{ matrix.php-versions == '8.2' }}
        uses: paambaati/codeclimate-action@v3.2.0
        env:
          CC_TEST_REPORTER_ID: ${{secrets.CC_TEST_REPORTER_ID}}
        with:
          coverageCommand: vendor/bin/phpunit --coverage-clover build/logs/clover.xml