mirror of
https://github.com/twigphp/Twig.git
synced 2026-09-19 05:46:41 +00:00
Enhancement: Use GithubActions instead of Travis for tests
This commit is contained in:
@@ -4,7 +4,7 @@ on:
|
|||||||
pull_request:
|
pull_request:
|
||||||
push:
|
push:
|
||||||
branches:
|
branches:
|
||||||
- '1.x'
|
- '2.x'
|
||||||
|
|
||||||
env:
|
env:
|
||||||
SYMFONY_PHPUNIT_DISABLE_RESULT_CACHE: 1
|
SYMFONY_PHPUNIT_DISABLE_RESULT_CACHE: 1
|
||||||
@@ -62,6 +62,77 @@ jobs:
|
|||||||
- name: "Run tests"
|
- name: "Run tests"
|
||||||
run: vendor/bin/simple-phpunit
|
run: vendor/bin/simple-phpunit
|
||||||
|
|
||||||
|
extension-tests:
|
||||||
|
needs:
|
||||||
|
- 'tests'
|
||||||
|
|
||||||
|
name: "${{ matrix.extension }} with PHP ${{ matrix.php-version }}"
|
||||||
|
|
||||||
|
runs-on: 'ubuntu-latest'
|
||||||
|
|
||||||
|
continue-on-error: true
|
||||||
|
|
||||||
|
strategy:
|
||||||
|
matrix:
|
||||||
|
php-version:
|
||||||
|
- '7.2.5'
|
||||||
|
- '7.3'
|
||||||
|
- '7.4'
|
||||||
|
- '8.0'
|
||||||
|
extension:
|
||||||
|
- 'extra/cssinliner-extra'
|
||||||
|
- 'extra/html-extra'
|
||||||
|
- 'extra/inky-extra'
|
||||||
|
- 'extra/intl-extra'
|
||||||
|
- 'extra/markdown-extra'
|
||||||
|
- 'extra/string-extra'
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: "Checkout code"
|
||||||
|
uses: actions/checkout@v2.3.3
|
||||||
|
|
||||||
|
- name: "Install PHP with extensions"
|
||||||
|
uses: shivammathur/setup-php@2.7.0
|
||||||
|
with:
|
||||||
|
coverage: "none"
|
||||||
|
php-version: ${{ matrix.php-version }}
|
||||||
|
ini-values: memory_limit=-1
|
||||||
|
tools: composer:v2
|
||||||
|
|
||||||
|
- name: "Add PHPUnit matcher"
|
||||||
|
run: echo "::add-matcher::${{ runner.tool_cache }}/phpunit.json"
|
||||||
|
|
||||||
|
- name: "Set composer cache directory"
|
||||||
|
id: composer-cache
|
||||||
|
run: echo "::set-output name=dir::$(composer config cache-files-dir)"
|
||||||
|
|
||||||
|
- name: "Cache composer"
|
||||||
|
uses: actions/cache@v2.1.2
|
||||||
|
with:
|
||||||
|
path: ${{ steps.composer-cache.outputs.dir }}
|
||||||
|
key: ${{ runner.os }}-${{ matrix.php-version }}-${{ matrix.extension }}-${{ hashFiles('composer.json') }}
|
||||||
|
restore-keys: ${{ runner.os }}-${{ matrix.php-version }}-${{ matrix.extension }}-
|
||||||
|
|
||||||
|
- run: composer install
|
||||||
|
|
||||||
|
- name: "Install PHPUnit"
|
||||||
|
run: vendor/bin/simple-phpunit install
|
||||||
|
|
||||||
|
- name: "PHPUnit version"
|
||||||
|
run: vendor/bin/simple-phpunit --version
|
||||||
|
|
||||||
|
- if: matrix.extension == 'extra/markdown-extra' && matrix.php-version == '8.0'
|
||||||
|
working-directory: ${{ matrix.extension}}
|
||||||
|
run: composer config platform.php 7.4.99
|
||||||
|
|
||||||
|
- name: "Composer install"
|
||||||
|
working-directory: ${{ matrix.extension}}
|
||||||
|
run: composer install
|
||||||
|
|
||||||
|
- name: "Run tests"
|
||||||
|
working-directory: ${{ matrix.extension}}
|
||||||
|
run: ../../vendor/bin/simple-phpunit
|
||||||
|
|
||||||
integration-tests:
|
integration-tests:
|
||||||
needs:
|
needs:
|
||||||
- 'tests'
|
- 'tests'
|
||||||
|
|||||||
@@ -9,6 +9,7 @@
|
|||||||
failOnWarning="true"
|
failOnWarning="true"
|
||||||
>
|
>
|
||||||
<php>
|
<php>
|
||||||
|
<env name="LANG" value="en_US.UTF-8" force="true" />
|
||||||
<ini name="error_reporting" value="-1" />
|
<ini name="error_reporting" value="-1" />
|
||||||
</php>
|
</php>
|
||||||
|
|
||||||
|
|||||||
@@ -13,4 +13,4 @@ return [];
|
|||||||
1.000.000,00 €
|
1.000.000,00 €
|
||||||
€1,000,000.00
|
€1,000,000.00
|
||||||
€12.34
|
€12.34
|
||||||
YEN125,000.00
|
YEN 125,000.00
|
||||||
|
|||||||
@@ -15,11 +15,11 @@
|
|||||||
return [];
|
return [];
|
||||||
--EXPECT--
|
--EXPECT--
|
||||||
Aug 7, 2019, 11:39:12 PM
|
Aug 7, 2019, 11:39:12 PM
|
||||||
7 août 2019 23:39:12
|
7 août 2019 à 23:39:12
|
||||||
23:39
|
23:39
|
||||||
07/08/2019
|
07/08/2019
|
||||||
mercredi 7 août 2019 23:39:12 UTC
|
mercredi 7 août 2019 à 23:39:12 Temps universel coordonné
|
||||||
11 oclock PM, GMT
|
11 oclock PM, Coordinated Universal Time
|
||||||
|
|
||||||
Aug 7, 2019
|
Aug 7, 2019
|
||||||
7 août 2019
|
7 août 2019
|
||||||
|
|||||||
Reference in New Issue
Block a user