Skip to content

Commit

Permalink
Fixed github actions ci. (#33)
Browse files Browse the repository at this point in the history
  • Loading branch information
terabytesoftw authored Dec 13, 2022
1 parent 0a0f9d6 commit 55d732a
Showing 1 changed file with 15 additions and 12 deletions.
27 changes: 15 additions & 12 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,14 +22,17 @@ jobs:
- windows-latest

php-version:
- "5.5"
- "5.6"
- "7.0"
- "7.1"
- 5.5
- 5.6
- 7.0
- 7.1
- 7.2
- 7.3
- 7.4

steps:
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v3

- name: Setup cache environment
id: cache-env
Expand All @@ -40,7 +43,7 @@ jobs:
key: ${{ env.key }}

- name: Cache extensions
uses: actions/cache@v2
uses: actions/cache@v3
with:
path: ${{ steps.cache-env.outputs.dir }}
key: ${{ steps.cache-env.outputs.key }}
Expand All @@ -55,16 +58,16 @@ jobs:
coverage: pcov
tools: composer:v2

- name: Determine composer cache directory on Linux
- name: Determine composer cache directory on Linux.
if: matrix.os == 'ubuntu-latest'
run: echo "::set-env name=COMPOSER_CACHE_DIR::$(composer config cache-dir)"
run: echo "COMPOSER_CACHE_DIR=$(composer config cache-dir)" >> $GITHUB_ENV

- name: Determine composer cache directory on Windows
- name: Determine composer cache directory on Windows.
if: matrix.os == 'windows-latest'
run: ECHO "::set-env name=COMPOSER_CACHE_DIR::~\AppData\Local\Composer"
run: echo "COMPOSER_CACHE_DIR=~\AppData\Local\Composer" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append

- name: Cache dependencies installed with composer
uses: actions/cache@v1
uses: actions/cache@v3
with:
path: ${{ env.COMPOSER_CACHE_DIR }}
key: php${{ matrix.php-version }}-composer-${{ hashFiles('**/composer.json') }}
Expand All @@ -80,7 +83,7 @@ jobs:

- name: Run tests with phpunit and without coverage on Linux
if: matrix.os == 'ubuntu-latest' && matrix.php-version != '7.1'
run: vendor/bin/phpunit --coverage-clover=coverage.clover
run: vendor/bin/phpunit

- name: Run tests with phpunit without coverage on Windows
if: matrix.os == 'windows-latest'
Expand Down

0 comments on commit 55d732a

Please sign in to comment.