File tree Expand file tree Collapse file tree 4 files changed +10
-10
lines changed
Expand file tree Collapse file tree 4 files changed +10
-10
lines changed Original file line number Diff line number Diff line change @@ -14,4 +14,8 @@ TEST_ADMIN_USERNAME=admin
1414TEST_ADMIN_PASSWORD=password
1515TEST_ADMIN_PATH=/wp-admin
1616
17+ # Whether to install PCOV in the tests CLI.
18+ # PCOV_ENABLED=1
19+
20+ # Used to install the premium GF Addons in the CLI script.
1721# GF_KEY=
Original file line number Diff line number Diff line change @@ -167,7 +167,7 @@ jobs:
167167 restore-keys : |
168168 ${{ runner.os }}-wp-plugins-
169169
170- - name : Setup WordPress
170+ - name : Setup .env file
171171 run : |
172172 cp .env.dist .env
173173 echo GF_KEY=${{ secrets.GF_KEY }} >> .env
@@ -274,7 +274,7 @@ jobs:
274274 restore-keys : |
275275 ${{ runner.os }}-wp-plugins-
276276
277- - name : Setup WordPress
277+ - name : Setup .env file
278278 run : |
279279 cp .env.dist .env
280280 echo GF_KEY=${{ secrets.GF_KEY }} >> .env
@@ -414,7 +414,7 @@ jobs:
414414 restore-keys : |
415415 ${{ runner.os }}-wp-plugins-
416416
417- - name : Setup WordPress
417+ - name : Setup Setup .env file
418418 run : |
419419 cp .env.dist .env
420420 echo GF_KEY=${{ secrets.GF_KEY }} >> .env
@@ -425,12 +425,8 @@ jobs:
425425 timeout_minutes : 10
426426 max_attempts : 3
427427 command : |
428- # Set the COVERAGE env var if coverage is enabled
429- if [ "${{ matrix.coverage }}" -eq "1" ]; then
430- echo "COVERAGE=1" >> $GITHUB_ENV
431- fi
428+ ${{ matrix.coverage ? 'PCOV_ENABLED=1' : '' }} npm run wp-env start -- ${{ secrets.ACTIONS_STEP_DEBUG && '--debug' || '' }}
432429
433- npm run wp-env start -- ${{ secrets.ACTIONS_STEP_DEBUG && '--debug' || '' }}
434430
435431 - name : Log versions
436432 run : |
Original file line number Diff line number Diff line change 5454 restore-keys : |
5555 ${{ runner.os }}-wp-env-
5656
57- - name : Setup WordPress
57+ - name : Setup .env file
5858 run : |
5959 cp .env.dist .env
6060 echo GF_KEY=${{ secrets.GF_KEY }} >> .env
Original file line number Diff line number Diff line change @@ -36,7 +36,7 @@ if [[ -n "$CONTAINER_ID" ]]; then
3636 install_pdo_mysql " $CONTAINER_ID " " tests-cli"
3737fi
3838
39- if [[ " $COVERAGE " == " 1" ]]; then
39+ if [[ " $PCOV_ENABLED " == " 1" ]]; then
4040 echo " Installing and enabling pcov extension for code coverage."
4141 npm run wp-env run tests-cli -- sudo pecl install pcov
4242
You can’t perform that action at this time.
0 commit comments