Only upload test coverage on non-fork #144
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: "ci build" | |
on: | |
pull_request: | |
push: | |
branches: | |
- "main" | |
jobs: | |
build: | |
name: PHP ${{ matrix.php-versions }} | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: false | |
matrix: | |
php-versions: ['8.1', '8.2'] | |
steps: | |
- name: Setup PHP Action | |
uses: shivammathur/setup-php@v2 | |
with: | |
extensions: intl | |
php-version: "${{ matrix.php-versions }}" | |
coverage: pcov | |
- name: Checkout | |
uses: actions/checkout@v2 | |
- name: "Validate composer.json and composer.lock" | |
run: "composer validate" | |
- name: "Install dependencies" | |
run: "composer install" | |
- name: "CS Check" | |
run: "composer cs-check" | |
- name: "Code analyze" | |
run: | | |
composer phpstan | |
composer rector | |
- name: "Run test suite" | |
run: "composer test" | |
- name: Upload coverage to Codecov | |
if: github.event.pull_request.head.repo.full_name == 'samsonasik/ArrayLookup' | |
uses: codecov/codecov-action@v1 | |
with: | |
token: ${{ secrets.CODECOV_TOKEN }} | |
file: ./build/logs/clover.xml | |
flags: tests | |
name: codecov-umbrella | |
yml: ./codecov.yml | |
fail_ci_if_error: true |