mirror of
https://github.com/codeigniter4/CodeIgniter4.git
synced 2025-02-20 11:44:28 +08:00
Bumps [actions/checkout](https://github.com/actions/checkout) from 3 to 4. - [Release notes](https://github.com/actions/checkout/releases) - [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md) - [Commits](https://github.com/actions/checkout/compare/v3...v4) --- updated-dependencies: - dependency-name: actions/checkout dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <support@github.com>
66 lines
1.8 KiB
YAML
66 lines
1.8 KiB
YAML
name: Reusable Coveralls Upload
|
|
|
|
on:
|
|
workflow_call:
|
|
inputs:
|
|
php-version:
|
|
description: The PHP version the workflow should run
|
|
type: string
|
|
required: true
|
|
|
|
jobs:
|
|
coveralls:
|
|
runs-on: ubuntu-22.04
|
|
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Setup PHP
|
|
uses: shivammathur/setup-php@v2
|
|
with:
|
|
php-version: ${{ inputs.php-version }}
|
|
tools: composer
|
|
coverage: xdebug
|
|
|
|
- name: Download coverage files
|
|
uses: actions/download-artifact@v3
|
|
with:
|
|
path: build/cov
|
|
|
|
- name: Display structure of downloaded files
|
|
run: ls -R
|
|
working-directory: build/cov
|
|
|
|
- name: Get composer cache directory
|
|
run: |
|
|
echo "COMPOSER_CACHE_FILES_DIR=$(composer config cache-files-dir)" >> $GITHUB_ENV
|
|
|
|
- name: Cache dependencies
|
|
uses: actions/cache@v3
|
|
with:
|
|
path: ${{ env.COMPOSER_CACHE_FILES_DIR }}
|
|
key: ${{ github.job }}-php-${{ inputs.php-version }}-${{ hashFiles('**/composer.*') }}
|
|
restore-keys: |
|
|
${{ github.job }}-php-${{ inputs.php-version }}-
|
|
${{ github.job }}-
|
|
|
|
- name: Cache PHPUnit's static analysis cache
|
|
uses: actions/cache@v3
|
|
with:
|
|
path: build/.phpunit.cache/code-coverage
|
|
key: phpunit-code-coverage-${{ hashFiles('**/phpunit.*') }}
|
|
restore-keys: |
|
|
phpunit-code-coverage-
|
|
|
|
- name: Install dependencies
|
|
run: composer update --ansi
|
|
|
|
- name: Merge coverage files
|
|
run: vendor/bin/phpcov merge --clover build/logs/clover.xml build/cov
|
|
|
|
- name: Upload coverage to Coveralls
|
|
run: vendor/bin/php-coveralls --verbose --exclude-no-stmt --ansi
|
|
env:
|
|
COVERALLS_REPO_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|