Long lost branch to support Laravel #80
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: Testing | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
branches: | |
- main | |
jobs: | |
build: | |
timeout-minutes: 10 | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Switch PHP Version | |
uses: shivammathur/setup-php@v2 | |
with: | |
php-version: '8.1.7' | |
coverage: xdebug | |
- name: Validate composer.json and composer.lock files | |
run: composer validate --no-interaction | |
- name: Cache Composer packages | |
id: composer-cache | |
uses: actions/cache@v2 | |
with: | |
path: vendor | |
key: ${{ runner.os }}-php-${{ hashFiles('**/composer.lock') }} | |
restore-keys: | | |
${{ runner.os }}-php- | |
- name: Install dependencies | |
if: steps.composer-cache.outputs.cache-hit != 'true' | |
run: composer install --prefer-dist --no-progress | |
- name: Run test suite with coverage | |
run: composer run-script test -- --stop-on-failure --coverage-clover clover.xml | |
- name: Save report as artifact | |
uses: actions/upload-artifact@v1 | |
with: | |
name: test-coverage-report | |
path: clover.xml | |
- name: Upload coverage | |
env: | |
CODACY_PROJECT_TOKEN: ${{ secrets.CODACY_PROJECT_API }} | |
run: bash <(curl -Ls https://coverage.codacy.com/get.sh) |