Skip to content

Require ext-bcmath in composer.json and updated dependencies #112

Require ext-bcmath in composer.json and updated dependencies

Require ext-bcmath in composer.json and updated dependencies #112

Workflow file for this run

name: "Tests"
on:
pull_request:
push:
branches:
- main
jobs:
tests:
runs-on: ${{ matrix.os }}
env:
PHP_EXTENSIONS: none, bcmath, curl, dom, json, gmp, mbstring, opcache, simplexml, sockets, tokenizer, xml, xmlwriter
PHP_INI_VALUES: memory_limit=-1, assert.exception=1, zend.assertions=1, error_reporting=-1, log_errors_max_len=0, display_errors=On
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest]
monero: [ 0.18.1.2, 0.18.2.2, 0.18.3.1 ]
php: [8.1, 8.2, 8.3]
dependency-version: [prefer-lowest, prefer-stable]
name: Tests PHP${{ matrix.php }} - ${{ matrix.os }} - ${{ matrix.dependency-version }} - monero ${{ matrix.monero }}
steps:
- uses: actions/checkout@v4
- name: Spin up containers
run: docker-compose -f tests/docker-compose.yml up -d
env:
MONERO_VERSION: ${{ matrix.monero }}
- name: Cache dependencies
uses: actions/cache@v3
with:
path: ~/.composer/cache/files
key: dependencies-php-${{ matrix.php }}-composer-${{ hashFiles('composer.json') }}
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
coverage: ${{ matrix.coverage-driver }}
extensions: ${{ env.PHP_EXTENSIONS }}
ini-values: ${{ env.PHP_INI_VALUES }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Install Composer dependencies
run: composer update --${{ matrix.dependency-version }} --no-ansi --no-interaction --no-progress --prefer-dist
- name: Run tests with PHPUnit
run: vendor/bin/phpunit
codecoverage:
runs-on: ubuntu-latest
name: "Code coverage report"
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Spin up containers
run: docker-compose -f tests/docker-compose.yml up -d
env:
MONERO_VERSION: "0.18.3.1"
- name: Install PHP
uses: shivammathur/setup-php@v2
with:
php-version: 8.2
extensions: none, bcmath, curl, dom, json, gmp, mbstring, opcache, simplexml, sockets, tokenizer, xml, xmlwriter
coverage: xdebug3
tools: none
- name: Install Composer dependencies
run: composer install --no-ansi --no-interaction --no-progress --prefer-dist
- name: Run tests with PHPUnit
run: vendor/bin/phpunit --coverage-clover=coverage.xml
- name: Send code coverage report to Codecov.io
uses: codecov/codecov-action@v3
with:
token: ${{ secrets.CODECOV_TOKEN }}