Skip to content

Update test.yaml

Update test.yaml #6

Workflow file for this run

name: Tests
on:
push:
branches: [ "*" ]
pull_request:
branches: [ "*" ]
jobs:
run-tests:
concurrency:
group: tests-${{ github.ref }}-${{ matrix.php-versions }}
cancel-in-progress: true
strategy:
matrix:
php-versions: ['7.4']
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 2
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php-versions }}
extensions: mbstring, intl, exif, iconv
coverage: xdebug
- name: Get composer cache directory
id: composercache
run: echo "::set-output name=dir::$(composer config cache-files-dir)"
- name: Cache dependencies
uses: actions/cache@v2
with:
path: ${{ steps.composercache.outputs.dir }}
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
restore-keys: ${{ runner.os }}-composer-
- name: Install Dependencies
run: composer install --no-interaction --prefer-dist --optimize-autoloader --ignore-platform-reqs
- name: Execute tests
run: php vendor/bin/phpunit --log-junit build/logs/junit-log.xml --coverage-clover=build/logs/clover.xml
- name: Coverage Upload
env:
OTTERWISE_TOKEN: ${{ secrets.OTTERWISE_TOKEN }}
run: bash <(curl -s https://raw.githubusercontent.com/getOtterWise/bash-uploader/main/uploader.sh) --log-file build/logs/junit-log.xml