Skip to content

Update changelog

Update changelog #172

Workflow file for this run

name: PHP Tests
on:
push:
branches:
- main
pull_request:
branches:
- main
jobs:
ci:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: true
matrix:
os: [ubuntu-latest]
php: [8.2, 8.1]
stability: [prefer-lowest, prefer-stable]
laravel: ["11.0", ^9.0, ^10.0]
include:
- laravel: ^10.0
testbench: ^8.0
- laravel: ^9.0
testbench: ^7.0
- laravel: "11.0"
testbench: ^9.0
exclude:
- laravel: "11.0"
php: 8.1
name: Tests P${{ matrix.php }} - ${{ matrix.os }} - ${{ matrix.stability }}
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 10
- name: Get Composer Cache Directory
id: composer-cache
run: |
echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT
- name: Cache dependencies
uses: actions/cache@v3
with:
path: ${{ steps.composer-cache.outputs.dir }}
key: ${{ matrix.os }}-${{ matrix.php }}-${{ matrix.stability }}-composer-${{ hashFiles('**/composer.lock') }}
restore-keys: |
${{ matrix.os }}-${{ matrix.php }}-${{ matrix.stability }}-composer-
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
extensions: dom, curl, libxml, mbstring, zip
tools: composer:v2
coverage: pcov
- name: Setup problem matchers for PHP
run: echo "::add-matcher::${{ runner.tool_cache }}/php.json"
- name: Setup problem matchers for PHPUnit
run: echo "::add-matcher::${{ runner.tool_cache }}/phpunit.json"
- name: Install Composer dependencies
run: composer update --${{ matrix.stability }} --no-interaction --prefer-dist
- name: Execute tests
env:
VIVA_API_KEY: ${{ secrets.VIVA_API_KEY }}
VIVA_CLIENT_ID: ${{ secrets.VIVA_CLIENT_ID }}
VIVA_CLIENT_SECRET: ${{ secrets.VIVA_CLIENT_SECRET }}
VIVA_ISV_CLIENT_ID: ${{ secrets.VIVA_ISV_CLIENT_ID }}
VIVA_ISV_CLIENT_SECRET: ${{ secrets.VIVA_ISV_CLIENT_SECRET }}
VIVA_ISV_PARTNER_API_KEY: ${{ secrets.VIVA_ISV_PARTNER_API_KEY }}
VIVA_ISV_PARTNER_ID: ${{ secrets.VIVA_ISV_PARTNER_ID }}
VIVA_ENVIRONMENT: demo
VIVA_MERCHANT_ID: ${{ secrets.VIVA_MERCHANT_ID }}
VIVA_SOURCE_CODE: ${{ secrets.VIVA_SOURCE_CODE }}
run: vendor/bin/phpunit --coverage-clover=build/coverage/coverage.clover
- name: Upload coverage
uses: sudo-bot/action-scrutinizer@latest
with:
cli-args: --format=php-clover build/coverage/coverage.clover