Syndesi/neo4j-sync-bundle

View on GitHub
.github/workflows/ci-unit-test-coverage.yml

Summary

Maintainability
Test Coverage
name: Unit Test Coverage Report

on:
    - push
    - fork
    - pull_request

jobs:
    coverage:
        runs-on: ubuntu-latest
        name: "Generate unit test coverage report for PHP ${{ matrix.php-version }}"
        strategy:
            fail-fast: false
        env:
            XDEBUG_MODE: coverage
        steps:
            - uses: actions/checkout@v2
            - name: Cache Composer dependencies
              uses: actions/cache@v2
              with:
                  path: /tmp/composer-cache
                  key: ${{ runner.os }}-${{ hashFiles('**/composer.lock') }}
            - uses: shivammathur/setup-php@v2
              with:
                  php-version: '8.1'
                  extensions: xdebug
                  tools: composer:v2
            - run: composer install
              shell: bash
            - run: composer test:coverage:xml
              shell: bash
            - uses: codecov/codecov-action@v2
              with:
                  files: coverage.xml
                  fail_ci_if_error: true
                  verbose: true
            - uses: paambaati/codeclimate-action@v3.0.0
              env:
                  CC_TEST_REPORTER_ID: ab092d57ca7008e76d43eba8da754a32aefc9b0bc2c427740c2e49f006ad0e7e
              with:
                  coverageLocations: coverage.xml:clover
            - uses: actions/upload-artifact@v2
              with:
                  name: coverage.xml
                  path: coverage.xml