From e644692ccf1c13e4efceb15c52517c474a4ae4f8 Mon Sep 17 00:00:00 2001 From: Shivam Mathur Date: Sun, 16 Feb 2020 18:40:22 +0530 Subject: [PATCH] Update test workflow --- .github/workflows/experimental-workflow.yml | 22 +++++++++++++++++-- .github/workflows/workflow.yml | 24 ++++++++++++++++++--- 2 files changed, 41 insertions(+), 5 deletions(-) diff --git a/.github/workflows/experimental-workflow.yml b/.github/workflows/experimental-workflow.yml index e1816394..62c5cc5f 100644 --- a/.github/workflows/experimental-workflow.yml +++ b/.github/workflows/experimental-workflow.yml @@ -27,6 +27,9 @@ jobs: matrix: operating-system: [ubuntu-latest, windows-latest, macos-latest] php-versions: ['8.0'] + env: + extensions: xml, opcache, xdebug, pcov + key: cache-v1 steps: - name: Checkout uses: actions/checkout@v2 @@ -53,12 +56,27 @@ jobs: timeout-minutes: 1 run: curl -s https://codecov.io/bash | bash -s -- -t ${{secrets.CODECOV_TOKEN}} -f coverage/clover.xml -n github-actions-codecov-${{ matrix.operating-system }}-php${{ matrix.php-versions }} + - name: Setup cache environment + id: cache-env + uses: shivammathur/cache-extensions@v1 + with: + php-version: ${{ matrix.php-versions }} + extensions: ${{ env.extensions }} + key: ${{ env.key }} + + - name: Cache extensions + uses: actions/cache@v1 + with: + path: ${{ steps.cache-env.outputs.dir }} + key: ${{ steps.cache-env.outputs.key }} + restore-keys: ${{ steps.cache-env.outputs.key }} + - name: Setup PHP with extensions and custom config run: node dist/index.js env: php-version: ${{ matrix.php-versions }} - extensions: xml, opcache, xdebug, pcov #optional - ini-values: post_max_size=256M, short_open_tag=On, date.timezone=Asia/Kolkata #optional + extensions: ${{ env.extensions }} + ini-values: post_max_size=256M, short_open_tag=On, date.timezone=Asia/Kolkata coverage: pcov - name: Testing PHP version diff --git a/.github/workflows/workflow.yml b/.github/workflows/workflow.yml index 35927cc6..b9a5ee79 100644 --- a/.github/workflows/workflow.yml +++ b/.github/workflows/workflow.yml @@ -24,7 +24,10 @@ jobs: fail-fast: false matrix: operating-system: [ubuntu-latest, windows-latest, macos-latest] - php-versions: ['5.6', '7.0', '7.1', '7.2', '7.3', '7.4'] + php-versions: ['5.3', '5.4', '5.5', '5.6', '7.0', '7.1', '7.2', '7.3', '7.4'] + env: + extensions: xml, opcache, xdebug, pcov + key: cache-v1 steps: - name: Checkout uses: actions/checkout@v2 @@ -51,12 +54,27 @@ jobs: timeout-minutes: 1 run: curl -s https://codecov.io/bash | bash -s -- -t ${{secrets.CODECOV_TOKEN}} -f coverage/clover.xml -n github-actions-codecov-${{ matrix.operating-system }}-php${{ matrix.php-versions }} + - name: Setup cache environment + id: cache-env + uses: shivammathur/cache-extensions@v1 + with: + php-version: ${{ matrix.php-versions }} + extensions: ${{ env.extensions }} + key: ${{ env.key }} + + - name: Cache extensions + uses: actions/cache@v1 + with: + path: ${{ steps.cache-env.outputs.dir }} + key: ${{ steps.cache-env.outputs.key }} + restore-keys: ${{ steps.cache-env.outputs.key }} + - name: Setup PHP with extensions and custom config run: node dist/index.js env: php-version: ${{ matrix.php-versions }} - extensions: xml, opcache, xdebug, pcov #optional - ini-values: post_max_size=256M, short_open_tag=On, date.timezone=Asia/Kolkata #optional + extensions: ${{ env.extensions }} + ini-values: post_max_size=256M, short_open_tag=On, date.timezone=Asia/Kolkata - name: Testing PHP version run: |