Commit 66dd545 1 parent 8ef2bc4 commit 66dd545 Copy full SHA for 66dd545
File tree 1 file changed +14
-15
lines changed
1 file changed +14
-15
lines changed Original file line number Diff line number Diff line change 1
1
name : PHPUnit Tests
2
2
3
- env :
4
- COMPOSER_VERSION : " 2"
5
- COMPOSER_CACHE : " ${{ github.workspace }}/.composer-cache"
6
-
7
3
on :
8
- schedule :
9
- - cron : ' 0 0 * * *'
10
4
push :
11
5
branches :
12
6
- develop
13
7
- trunk
8
+ paths :
9
+ - " **.php"
14
10
pull_request :
15
11
branches :
16
12
- develop
13
+ paths :
14
+ - " **.php"
17
15
18
16
jobs :
19
17
phpunit :
@@ -29,19 +27,20 @@ jobs:
29
27
- name : Checkout
30
28
uses : actions/checkout@v4
31
29
32
- - name : Set standard 10up cache directories
33
- run : |
34
- composer config -g cache-dir "${{ env.COMPOSER_CACHE }}"
30
+ - name : Get composer cache directory
31
+ id : composer-cache
32
+ run : echo "dir=$( composer config cache-files- dir)" >> $GITHUB_OUTPUT
35
33
36
- - name : Prepare composer cache
34
+ - name : Cache dependencies
35
+ id : cache-composer
37
36
uses : actions/cache@v4
37
+ env :
38
+ cache-name : cache-composer
38
39
with :
39
- path : ${{ env.COMPOSER_CACHE }}
40
- key : composer-${{ env.COMPOSER_VERSION }}-${{ hashFiles('**/composer.lock') }}
41
- restore-keys : |
42
- composer-${{ env.COMPOSER_VERSION }}-
40
+ path : ${{ steps.composer-cache.outputs.dir }}
41
+ key : ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/composer.lock') }}
43
42
44
- - uses : getong/mariadb-action@v1.1
43
+ - uses : getong/mariadb-action@v1
45
44
46
45
- name : Set PHP version
47
46
uses : shivammathur/setup-php@v2
You can’t perform that action at this time.
0 commit comments