File tree Expand file tree Collapse file tree 4 files changed +50
-1
lines changed
integrations/query-monitor Expand file tree Collapse file tree 4 files changed +50
-1
lines changed Original file line number Diff line number Diff line change 1+ name : WordPress End-to-end Tests
2+
3+ on :
4+ push :
5+ branches :
6+ - main
7+ pull_request :
8+
9+ jobs :
10+ test :
11+ name : WordPress End-to-end Tests
12+ runs-on : ubuntu-latest
13+ timeout-minutes : 20
14+
15+ steps :
16+ - name : Checkout repository
17+ uses : actions/checkout@v4
18+
19+ - name : Set up Docker Buildx
20+ uses : docker/setup-buildx-action@v3
21+
22+ - name : Set UID and GID for PHP in WordPress images
23+ run : |
24+ echo "PHP_FPM_UID=$(id -u)" >> $GITHUB_ENV
25+ echo "PHP_FPM_GID=$(id -g)" >> $GITHUB_ENV
26+
27+ - name : Setup WordPress test environment
28+ run : composer run wp-setup
29+
30+ - name : Start WordPress test environment
31+ run : composer run wp-test-start
32+
33+ - name : Run WordPress end-to-end tests
34+ run : composer run wp-test-e2e
35+
36+ - name : Stop Docker containers
37+ if : always()
38+ run : composer run wp-test-clean
Original file line number Diff line number Diff line change 4747 ],
4848 "wp-test-start" : [
4949 " npm --prefix wordpress run env:start" ,
50- " npm --prefix wordpress run env:install"
50+ " npm --prefix wordpress run env:install" ,
51+ " npm --prefix wordpress run env:cli -- plugin install gutenberg" ,
52+ " npm --prefix wordpress run env:cli -- plugin install query-monitor"
5153 ],
5254 "wp-test-php" : [
5355 " rm -rf wordpress/src/wp-content/database && npm --prefix wordpress run test:php --"
5456 ],
57+ "wp-test-e2e" : [
58+ " npm --prefix wordpress run test:e2e --"
59+ ],
5560 "wp-test-clean" : [
5661 " npm --prefix wordpress run env:clean"
5762 ]
Original file line number Diff line number Diff line change 6969
7070$ query_monitor_active = false ;
7171try {
72+ $ show_errors = $ wpdb ->hide_errors ();
73+
7274 $ value = $ wpdb ->get_row (
7375 $ wpdb ->prepare (
7476 "SELECT option_value FROM $ wpdb ->options WHERE option_name = %s LIMIT 1 " ,
7577 'active_plugins '
7678 )
7779 );
80+
81+ $ wpdb ->show_errors ( $ show_errors );
82+
7883 /**
7984 * $value may be null during WordPress Playground multisite setup.
8085 * @see https://github.com/WordPress/sqlite-database-integration/pull/219.
Original file line number Diff line number Diff line change @@ -65,3 +65,4 @@ sed -i.bak "s#class WpdbExposedMethodsForTesting extends wpdb {#class WpdbExpose
6565# 6. Install dependencies.
6666echo " Installing dependencies..."
6767npm --prefix " $WP_DIR " install
68+ npm --prefix " $WP_DIR " run build:dev
You can’t perform that action at this time.
0 commit comments