Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/check-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: Check and Test
on:
push:
branches:
- 'master'
- '**'
pull_request:
branches:
- '**'
Expand Down
25 changes: 19 additions & 6 deletions .github/workflows/integration-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: Integration Tests
on:
push:
branches:
- 'master'
- '**'
pull_request:
branches:
- '**'
Expand Down Expand Up @@ -31,7 +31,7 @@ jobs:
with:
node-version: 18
cache: 'npm'

- name: Cache node_modules
uses: actions/cache@v4
with:
Expand All @@ -57,13 +57,26 @@ jobs:

- run: npx playwright install --with-deps
if: steps.playwright-cache.outputs.cache-hit != 'true'

- name: Run script
run: ./bin/integration-tests ${{ matrix.wp }} ${{ matrix.php}}

- name: Start WordPress
uses: nick-fields/retry@v3
with:
timeout_minutes: 10
max_attempts: 3
shell: bash
command: ./bin/run-wordpress ${{ matrix.wp }} ${{ matrix.php}}

- name: Start Mocks
run: ./bin/run-mocks 8100

- name: Run integration tests
run: npm run test:playwright
env:
WORDPRESS_PORT: 80${{ matrix.wp }}

- uses: actions/upload-artifact@v4
if: ${{ !cancelled() }}
with:
name: playwright-report-${{ matrix.wp }}-${{ matrix.php }}
path: playwright-report/
retention-days: 30
retention-days: 30
100 changes: 0 additions & 100 deletions bin/integration-tests

This file was deleted.

8 changes: 6 additions & 2 deletions bin/run-wordpress
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,13 @@ export WP_ENV_TESTS_PORT=80${WORDPRESS_VERSION}
export WP_ENV_CORE=WordPress/Wordpress#${WORDPRESS_VERSION_FULL}
export WP_ENV_PHP_VERSION=${PHP_VERSION_FULL}

npx wp-env start
npx wp-env start || exit 1

echo "Installing compatible plugins.."
npx wp-env run tests-cli wp plugin install amazon-s3-and-cloudfront

if [ "$WORDPRESS_VERSION" -ge 55 ]; then
echo "Installing compatible plugins for WordPress ${WORDPRESS_VERSION_FULL}.."
npx wp-env run tests-cli wp plugin install amazon-s3-and-cloudfront || exit 1
fi

echo "To stop, run: bin/stop-wordpress"
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
"composer/installers": "~1.0"
},
"require-dev": {
"phpunit/phpunit": "~4.6",
"phpunit/phpunit": "9.6.22",
"mikey179/vfsstream": "~1.5",
"mockery/mockery": "~0.9",
"phpdocumentor/reflection-docblock": "~2.0",
Expand Down
Loading