Skip to content

Commit f16e8c6

Browse files
committed
update tests for github actions — wip
1 parent 50bd1ec commit f16e8c6

1 file changed

Lines changed: 21 additions & 12 deletions

File tree

.github/workflows/tests.yml

Lines changed: 21 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -41,17 +41,6 @@ jobs:
4141
coverage: none
4242
tools: composer:v2
4343

44-
- name: Get Composer cache directory
45-
id: composer-cache
46-
run: echo "dir=$(composer config cache-files-dir)" >> "$GITHUB_OUTPUT"
47-
48-
- name: Cache Composer dependencies
49-
uses: actions/cache@v4
50-
with:
51-
path: ${{ steps.composer-cache.outputs.dir }}
52-
key: ${{ runner.os }}-composer-${{ hashFiles('composer.lock') }}
53-
restore-keys: ${{ runner.os }}-composer-
54-
5544
- name: Create TypeRocket root install
5645
run: |
5746
composer create-project --prefer-dist typerocket/typerocket .
@@ -62,6 +51,18 @@ jobs:
6251
with:
6352
path: vendor/typerocket/core
6453

54+
- name: Get Composer cache directory
55+
id: composer-cache
56+
working-directory: vendor/typerocket/core
57+
run: echo "dir=$(composer config cache-files-dir)" >> "$GITHUB_OUTPUT"
58+
59+
- name: Cache Composer dependencies
60+
uses: actions/cache@v4
61+
with:
62+
path: ${{ steps.composer-cache.outputs.dir }}
63+
key: ${{ runner.os }}-composer-${{ hashFiles('vendor/typerocket/core/composer.lock') }}
64+
restore-keys: ${{ runner.os }}-composer-
65+
6566
- name: Setup databases
6667
run: |
6768
mysql --host=127.0.0.1 --user=root --execute="SET NAMES utf8; CREATE DATABASE IF NOT EXISTS wordpress;"
@@ -79,7 +80,15 @@ jobs:
7980

8081
- name: Verify WordPress database
8182
run: php galaxy wp db check
83+
env:
84+
HTTP_HOST: 127.0.0.1
8285

8386
- name: Run tests
8487
working-directory: vendor/typerocket/core
85-
run: vendor/bin/phpunit
88+
run: |
89+
pwd
90+
test -f phpunit.xml
91+
test -x vendor/bin/phpunit
92+
vendor/bin/phpunit --configuration phpunit.xml --testdox --display-errors --display-warnings --display-deprecations --fail-on-empty-test-suite
93+
env:
94+
HTTP_HOST: 127.0.0.1

0 commit comments

Comments
 (0)