Update dependency rector/rector to v2 #3444
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
on: [ push, pull_request ] | |
name: Codecov | |
jobs: | |
codeception-tests: | |
name: "Codeception tests" | |
runs-on: "ubuntu-latest" | |
continue-on-error: ${{ matrix.allow-fail }} | |
strategy: | |
matrix: | |
include: | |
- { php-version: 8.2, dependencies: locked, coverage: xdebug, with_coverage: true, allow-fail: false } | |
steps: | |
- name: "Checkout" | |
uses: "actions/[email protected]" | |
- name: "Install PHP" | |
uses: "shivammathur/setup-php@v2" | |
with: | |
coverage: "${{ matrix.coverage }}" | |
ini-values: display_errors=On, display_startup_errors=On, error_reporting=32767 | |
php-version: "${{ matrix.php-version }}" | |
- name: "Set up problem matchers for PHP" | |
run: "echo \"::add-matcher::${{ runner.tool_cache }}/php.json\"" | |
- name: "Set up problem matchers for phpunit/phpunit" | |
run: "echo \"::add-matcher::${{ runner.tool_cache }}/phpunit.json\"" | |
- name: "Validate composer.json and composer.lock" | |
run: "composer validate --ansi --strict" | |
- name: "Determine composer cache directory" | |
uses: "ergebnis/.github/actions/composer/[email protected]" | |
- name: "Cache dependencies installed with composer" | |
uses: "actions/[email protected]" | |
with: | |
path: "${{ env.COMPOSER_CACHE_DIR }}" | |
key: "php-${{ matrix.php-version }}-composer-${{ matrix.dependencies }}-${{ hashFiles('composer.lock') }}" | |
restore-keys: "php-${{ matrix.php-version }}-composer-${{ matrix.dependencies }}-" | |
- name: "Install ${{ matrix.dependencies }} dependencies with composer" | |
uses: "ergebnis/.github/actions/composer/[email protected]" | |
with: | |
dependencies: "${{ matrix.dependencies }}" | |
- name: "Run Codeception with coverage" | |
run: | | |
vendor/bin/codecept run -c . -vvv --coverage --coverage-xml=coverage.xml --xml | |
- name: "Upload Coverage coverage" | |
run: | | |
export CODACY_PROJECT_TOKEN=${{ secrets.CODACY_PROJECT_TOKEN }} | |
bash <(curl -Ls https://coverage.codacy.com/get.sh) report -r ./build/logs/coverage.xml | |
- name: Upload test results to Codecov | |
if: ${{ !cancelled() }} | |
uses: codecov/test-results-action@v1 | |
with: | |
files: ./build/logs/report.xml | |
token: ${{ secrets.CODECOV_TOKEN }} | |
- name: Upload coverage to Codecov | |
uses: codecov/codecov-action@v5 | |
with: | |
token: ${{ secrets.CODECOV_TOKEN }} # not required for public repos | |
files: ./build/logs/coverage.xml | |
flags: unittests # optional | |
fail_ci_if_error: "${{ matrix.with_coverage }}" # optional (default = false) | |
verbose: false # optional (default = false) |