13
13
CC_TEST_REPORTER_URL : ${{ vars.CC_TEST_REPORTER_URL }}
14
14
15
15
jobs :
16
- prepare :
16
+ configs :
17
17
name : Prepare
18
- uses : ./.github/workflows/prepare .yml
18
+ uses : ./.github/workflows/configure .yml
19
19
secrets : inherit
20
20
21
21
permissions :
25
25
tests :
26
26
name : Test on PHP ${{ matrix.php }} with DB ${{ matrix.db }}
27
27
runs-on : ubuntu-latest
28
- needs : prepare
28
+ needs : configs
29
29
outputs :
30
30
has-reports : ${{ steps.reports.outputs.has-reports }}
31
31
@@ -42,25 +42,33 @@ jobs:
42
42
POSTGRES_DB : ${{ env.DB_DATABASE }}
43
43
POSTGRES_USER : ${{ env.DB_USERNAME }}
44
44
POSTGRES_PASSWORD : ${{ env.DB_PASSWORD }}
45
- options : --health-cmd=pg_isready --health-interval=10s --health-timeout=5s --health-retries=3
46
45
ports :
47
46
- 5432:5432
47
+ options : >-
48
+ --health-cmd=pg_isready
49
+ --health-interval=10s
50
+ --health-timeout=5s
51
+ --health-retries=3
48
52
mysql :
49
53
image : mysql:8.0
50
54
env :
51
55
MYSQL_ROOT_PASSWORD : ${{ env.DB_PASSWORD }}
52
56
MYSQL_DATABASE : ${{ env.DB_DATABASE }}
53
57
MYSQL_USER : ${{ env.DB_USERNAME }}
54
58
MYSQL_PASSWORD : ${{ env.DB_PASSWORD }}
55
- options : --health-cmd="mysqladmin ping" --health-interval=10s --health-timeout=5s --health-retries=3
56
59
ports :
57
60
- 3306:3306
61
+ options : >-
62
+ --health-cmd="mysqladmin ping"
63
+ --health-interval=10s
64
+ --health-timeout=5s
65
+ --health-retries=3
58
66
59
67
strategy :
60
68
fail-fast : false
61
69
matrix :
62
70
php : [8.1, 8.2]
63
- db : ['mysql', 'pgsql', 'sqlite' ]
71
+ db : ['mysql', 'pgsql']
64
72
65
73
steps :
66
74
- name : Checkout
79
87
- name : Cache Composer dependencies
80
88
uses : actions/cache@v4
81
89
with :
82
- path : ${{ needs.prepare .outputs.composer-cache }}
90
+ path : ${{ needs.configs .outputs.composer-cache }}
83
91
key : ${{ runner.os }}-${{ matrix.php }}-composer-${{ hashFiles('**/composer.lock') }}
84
92
restore-keys : ${{ runner.os }}-${{ matrix.php }}-composer-
85
93
@@ -91,10 +99,10 @@ jobs:
91
99
92
100
- name : Generate reports for CodeClimate
93
101
id : reports
94
- if : ${{ github.actor != 'dependabot[bot]' || needs.prepare .outputs.should-reports == '1' }}
102
+ if : ${{ github.actor != 'dependabot[bot]' || needs.configs .outputs.should-reports == '1' }}
95
103
env :
96
104
COVERAGE_FILE : tests/reports/clover.xml
97
- CODECLIMATE_REPORT : ${{ github.workspace }}/ tests/reports/codeclimate.${{ matrix.php }}.json
105
+ CODECLIMATE_REPORT : tests/reports/codeclimate.${{ matrix.php }}.json
98
106
run : |
99
107
if [[ -z \"$CC_TEST_REPORTER_URL\" ]]; then
100
108
curl -LSs $CC_TEST_REPORTER_URL > ./cc-test-reporter && chmod +x ./cc-test-reporter
@@ -104,7 +112,7 @@ jobs:
104
112
105
113
- name : Upload tests reports
106
114
uses : actions/upload-artifact@v4
107
- if : ${{ github.actor != 'dependabot[bot]' || needs.prepare .outputs.should-reports == '1' }}
115
+ if : ${{ github.actor != 'dependabot[bot]' || needs.configs .outputs.should-reports == '1' }}
108
116
with :
109
117
name : test-reports-${{ matrix.php }}-${{ matrix.db }}
110
118
path : tests/reports
0 commit comments