Skip to content

Commit 37385f5

Browse files
authored
Fix pipeline
1 parent 0be8b4e commit 37385f5

2 files changed

Lines changed: 9 additions & 38 deletions

File tree

.github/workflows/build.yml

Lines changed: 8 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -27,21 +27,6 @@ jobs:
2727
- name: Checkout
2828
uses: actions/checkout@v2
2929

30-
- name: Setup cache environment
31-
id: cache-env
32-
uses: shivammathur/cache-extensions@v1
33-
with:
34-
php-version: ${{ matrix.php-version }}
35-
extensions: ${{ env.extensions }}
36-
key: ${{ env.key }}
37-
38-
- name: Cache extensions
39-
uses: actions/cache@v1
40-
with:
41-
path: ${{ steps.cache-env.outputs.dir }}
42-
key: ${{ steps.cache-env.outputs.key }}
43-
restore-keys: ${{ steps.cache-env.outputs.key }}
44-
4530
- name: Install PHP with extensions
4631
uses: shivammathur/setup-php@v2
4732
with:
@@ -53,38 +38,24 @@ jobs:
5338

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

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

6247
- name: Cache dependencies installed with composer
6348
uses: actions/cache@v2
6449
with:
6550
path: ${{ env.COMPOSER_CACHE_DIR }}
66-
key: php${{ matrix.php-version }}-composer-${{ hashFiles('**/composer.json') }}
51+
key: php${{ matrix.php }}-composer-${{ hashFiles('**/composer.json') }}
6752
restore-keys: |
68-
php${{ matrix.php-version }}-composer-
53+
php${{ matrix.php }}-composer-
6954
7055
- name: Install dependencies with composer php 7.4
71-
if: matrix.php-version == '7.4'
72-
run: composer update --prefer-dist --no-interaction --no-progress --optimize-autoloader
56+
if: matrix.php == '7.4'
57+
run: composer update --prefer-dist --no-interaction --no-progress --optimize-autoloader --ansi
7358

7459
- name: Install dependencies with composer php 8.0
75-
if: matrix.php-version == '8.0'
76-
run: composer update --ignore-platform-reqs --prefer-dist --no-interaction --no-progress --optimize-autoloader
77-
78-
- name: Run tests with phpunit and coverage on Linux php 7.4
79-
if: matrix.os == 'ubuntu-latest' && matrix.php-version == '7.4'
80-
run: vendor/bin/phpunit --coverage-clover=coverage.clover
81-
82-
- name: Run tests with phpunit without coverage
83-
if: matrix.os != 'ubuntu-latest' || matrix.php-version != '7.4'
84-
run: vendor/bin/phpunit
85-
86-
- name: Upload code coverage scrutinizer on Linux php 7.4
87-
if: matrix.os == 'ubuntu-latest' && matrix.php-version == '7.4'
88-
run: |
89-
wget https://scrutinizer-ci.com/ocular.phar
90-
php ocular.phar code-coverage:upload --format=php-clover coverage.clover
60+
if: matrix.php == '8.0'
61+
run: composer update --prefer-dist --no-interaction --no-progress --optimize-autoloader --ignore-platform-reqs --ansi

.github/workflows/static.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ jobs:
3333
coverage: none
3434

3535
- name: Determine composer cache directory
36-
run: echo "::set-env name=COMPOSER_CACHE_DIR::$(composer config cache-dir)"
36+
run: echo "COMPOSER_CACHE_DIR=$(composer config cache-dir)" >> $GITHUB_ENV
3737

3838
- name: Cache dependencies installed with composer
3939
uses: actions/cache@v2

0 commit comments

Comments
 (0)