Skip to content

Fix task execution status update not saved (#47) #10

Fix task execution status update not saved (#47)

Fix task execution status update not saved (#47) #10

name: PHP Test
on:
pull_request:
push:
branches:
- 'master'
- '[0-9]+.x'
- '[0-9]+.[0-9]+'
- '[0-9]+.[0-9]+.x'
jobs:
test:
name: '${{ matrix.php-version }} ${{ matrix.dependencies }}, Coverage ${{ matrix.coverage }}'
runs-on: ubuntu-20.04
env:
COVERAGE: ${{ matrix.coverage }}
strategy:
fail-fast: false
matrix:
include:
- php-version: '8.0'
dependencies: 'lowest'
- php-version: '8.0'
- php-version: '8.1'
coverage: 'true'
steps:
- name: Checkout project
uses: actions/checkout@v2
with:
# Fetch 10 commits or Scrutinizer will throw ("Failed to retrieve commit parents. If you use a shallow git checkout, please checkout at least a depth of one."), see: RepositoryIntrospector at scrutinizer-ci/ocular GitHub repository
# 10 commits is an arbitrary value that is more than 1 commit
fetch-depth: 10
- name: Install and configure PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php-version }}
tools: 'composer:v2'
- name: Install dependencies with Composer
uses: ramsey/composer-install@v2
with:
dependency-versions: ${{ matrix.dependencies }}
composer-options: --prefer-dist --no-suggest
- name: Execute test
run: vendor/bin/simple-phpunit -c phpunit.xml.dist --coverage-clover=coverage.clover
- name: Coverage
if: ${{ matrix.coverage }}
run: |
composer global require scrutinizer/ocular
~/.composer/vendor/bin/ocular code-coverage:upload --access-token="230ec5e01daf5bb3e46ea304fb20348b52d80de73463ec08ee9c96fcd1349e35" --format=php-clover coverage.clover