diff --git a/.gitattributes b/.gitattributes index 27a14cf..a463eac 100644 --- a/.gitattributes +++ b/.gitattributes @@ -10,7 +10,6 @@ /.gitignore export-ignore /.gitsplit.yml export-ignore /.php_cs.dist export-ignore -/.scrutinizer.yml export-ignore /CONTRIBUTING.md export-ignore /php_cs.xml export-ignore /phpunit.xml.dist export-ignore diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 27a8ead..77ec92c 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -7,8 +7,9 @@ on: jobs: coding-standards: name: 'Coding Standards - PHP ${{ matrix.php-version }}' - runs-on: 'ubuntu-latest' + # We want to run on external PRs, but not on our own internal PRs as they'll be run by the push to the branch. + if: ${{ !(github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name == github.repository) }} strategy: fail-fast: false @@ -54,8 +55,9 @@ jobs: tests: name: 'Tests - PHP ${{ matrix.php-version }}' - runs-on: ubuntu-latest + # We want to run on external PRs, but not on our own internal PRs as they'll be run by the push to the branch. + if: ${{ !(github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name == github.repository) }} strategy: fail-fast: false @@ -96,8 +98,9 @@ jobs: code-coverage: name: 'Code Coverage - PHP ${{ matrix.php-version }}' - runs-on: 'ubuntu-latest' + # We want to run on external PRs, but not on our own internal PRs as they'll be run by the push to the branch. + if: ${{ !(github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name == github.repository) }} strategy: fail-fast: false @@ -130,11 +133,12 @@ jobs: run: composer show - name: 'Run tests with coverage' - run: phpdbg -qrr vendor/bin/phpunit --coverage-clover coverage/clover.xml + run: vendor/bin/phpunit --coverage-clover coverage/clover.xml - - name: 'Send Coverage' - continue-on-error: true - timeout-minutes: 1 - run: | - wget https://scrutinizer-ci.com/ocular.phar - php ocular.phar code-coverage:upload --format=php-clover coverage/clover.xml + - name: 'Send Coverage to Codecov' + uses: codecov/codecov-action@v3 + with: + token: ${{ secrets.CODECOV_TOKEN }} + files: coverage/clover.xml + flags: unittests + fail_ci_if_error: true diff --git a/.scrutinizer.yml b/.scrutinizer.yml deleted file mode 100644 index 573ab4a..0000000 --- a/.scrutinizer.yml +++ /dev/null @@ -1,17 +0,0 @@ -filter: - paths: - - src/ - dependency_paths: - - vendor/ -build: - environment: - php: - version: 7.4 - dependencies: - override: - - composer install --ignore-platform-reqs --no-interaction - tests: - override: - - php-scrutinizer-run -tools: - external_code_coverage: true