Adjust php extensions and fix iconv patch and coverage names

Signed-off-by: William Desportes <williamdes@wdes.fr>
This commit is contained in:
William Desportes 2021-01-19 22:23:50 +01:00
parent 9b6cb9ce7d
commit 0d7ec7bbfe
No known key found for this signature in database
GPG Key ID: 90A0EF1B8251A889
4 changed files with 66 additions and 6 deletions

View File

@ -37,10 +37,13 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Lint PHP files
run: ./test/ci-phplint
- name: Use php 7.1
uses: shivammathur/setup-php@v2
with:
php-version: 7.1
extensions: mbstring, iconv, mysqli, zip, gd
tools: composer:v2
- name: Validate composer.json and composer.lock
run: composer validate
@ -71,6 +74,7 @@ jobs:
uses: shivammathur/setup-php@v2
with:
php-version: 7.2
extensions: mbstring, iconv, mysqli, zip, gd
tools: composer:v2
- name: Cache module
uses: actions/cache@v2

View File

@ -29,7 +29,7 @@ jobs:
uses: shivammathur/setup-php@v2
with:
php-version: 7.1
extensions: mbstring, iconv
extensions: mbstring, iconv, mysqli, zip, gd
tools: composer:v2
- name: Cache module
uses: actions/cache@v2

View File

@ -26,8 +26,9 @@ jobs:
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php-version }}
extensions: mbstring, iconv
extensions: mbstring, iconv, mysqli, zip, gd
coverage: xdebug
tools: composer:v2
- name: Cache module
uses: actions/cache@v2
with:
@ -43,6 +44,9 @@ jobs:
run: composer run phpunit -- --exclude-group selenium
- name: Send coverage
uses: codecov/codecov-action@v1
with:
flags: unit-${{ matrix.php-version }}-${{ matrix.os }}
name: phpunit-${{ matrix.php-version }}-${{ matrix.os }}
- name: Send coverage to Scrutinizer
uses: sudo-bot/action-scrutinizer@latest
# Upload can fail on forks
@ -74,8 +78,9 @@ jobs:
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php-version }}
extensions: mbstring, dbase, iconv
extensions: dbase, mbstring, iconv, mysqli, zip, gd
coverage: xdebug
tools: composer:v2
- name: Cache module
uses: actions/cache@v2
with:
@ -87,6 +92,57 @@ jobs:
run: composer run phpunit -- --exclude-group selenium
- name: Send coverage
uses: codecov/codecov-action@v1
with:
flags: dbase-extension
name: php-7.1-dbase-enabled
- name: Send coverage to Scrutinizer
uses: sudo-bot/action-scrutinizer@latest
# Upload can fail on forks
continue-on-error: true
with:
cli-args: "--format=php-clover build/logs/clover.xml"
- name: Send coverage to Codacy
# Upload can fail on forks or if the secret is missing
continue-on-error: true
uses: codacy/codacy-coverage-reporter-action@master
with:
project-token: ${{ secrets.CODACY_PROJECT_TOKEN }}
coverage-reports: build/logs/clover.xml
test-php-recode:
name: Test on php ${{ matrix.php-version }} and ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
php-version: ["7.1"]
os: [ubuntu-latest]
steps:
- uses: actions/checkout@v2
- name: Install gettext
run: sudo apt-get install -y gettext
- name: Generate mo files
run: ./scripts/generate-mo --quiet
- name: Use php ${{ matrix.php-version }}
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php-version }}
extensions: recode, mbstring, iconv, mysqli, zip, gd
coverage: xdebug
tools: composer:v2
- name: Cache module
uses: actions/cache@v2
with:
path: ~/.composer/cache/
key: composer-cache
- name: Install dependencies
run: composer install
- name: Run php tests
run: composer run phpunit -- --exclude-group selenium
- name: Send coverage
uses: codecov/codecov-action@v1
with:
flags: recode-extension
name: php-7.1-recode-enabled
- name: Send coverage to Scrutinizer
uses: sudo-bot/action-scrutinizer@latest
# Upload can fail on forks
@ -118,8 +174,8 @@ jobs:
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php-version }}
extensions: mbstring
coverage: xdebug
extensions: mbstring, iconv, mysqli, zip, gd
tools: composer:v2
- name: Cache module
uses: actions/cache@v2
with:

View File

@ -97,7 +97,7 @@ class EncodingTest extends AbstractTestCase
}
}
_setlocale(LC_ALL, 'POSIX')
_setlocale(LC_ALL, 'POSIX');
if (PHP_INT_SIZE === 8) {
$GLOBALS['cfg']['IconvExtraParams'] = '//TRANSLIT';