|
1 | 1 | name: Tests |
2 | 2 |
|
3 | | -# Run this workflow every time a new commit pushed to your repository |
4 | 3 | on: |
5 | 4 | push: |
6 | 5 | branches: |
7 | 6 | - '*.x' |
8 | | - pull_request: |
| 7 | + pull_request: |
9 | 8 |
|
10 | 9 | jobs: |
11 | 10 | tests: |
@@ -34,45 +33,13 @@ jobs: |
34 | 33 | - name: Checkout code |
35 | 34 | uses: actions/checkout@v3 |
36 | 35 |
|
37 | | - - name: Setup cache environment |
38 | | - id: extcache |
39 | | - uses: shivammathur/cache-extensions@v1 |
40 | | - with: |
41 | | - php-version: ${{ matrix.php-versions }} |
42 | | - extensions: ${{ env.extensions }} |
43 | | - key: ${{ env.key }} |
44 | | - |
45 | | - - name: Cache PHP Extensions |
46 | | - uses: actions/cache@v2 |
47 | | - with: |
48 | | - path: ${{ steps.extcache.outputs.dir }} |
49 | | - key: ${{ steps.extcache.outputs.key }} |
50 | | - restore-keys: ${{ steps.extcache.outputs.key }} |
51 | | - |
52 | | - - name: Cache Composer Dependencies |
53 | | - uses: actions/cache@v3 |
54 | | - with: |
55 | | - path: ~/.composer/cache/files |
56 | | - key: dependencies-composer-${{ hashFiles('composer.json') }} |
57 | | - |
58 | 36 | - name: Setup PHP Action |
59 | 37 | uses: shivammathur/setup-php@v2 |
60 | 38 | with: |
61 | 39 | php-version: ${{ matrix.php-versions }} |
62 | 40 | extensions: ${{ env.extensions }} |
63 | 41 | coverage: xdebug |
64 | | - tools: pecl, composer |
65 | | - |
66 | | - - name: Get composer cache directory |
67 | | - id: composer-cache |
68 | | - run: echo "::set-output name=dir::$(composer config cache-files-dir)" |
69 | | - |
70 | | - - name: Cache dependencies |
71 | | - uses: actions/cache@v3 |
72 | | - with: |
73 | | - path: ${{ steps.composer-cache.outputs.dir }} |
74 | | - key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }} |
75 | | - restore-keys: ${{ runner.os }}-composer- |
| 42 | + tools: 'composer:v2, pecl' |
76 | 43 |
|
77 | 44 | - name: Install Composer dependencies |
78 | 45 | run: composer update ${{ matrix.COMPOSER_FLAGS }} --no-interaction |
|
0 commit comments