Skip to content

Commit a708869

Browse files
committed
Run full native suites after bulk materialization
1 parent 8087830 commit a708869

2 files changed

Lines changed: 8 additions & 20 deletions

File tree

.github/workflows/mysql-parser-extension-tests.yml

Lines changed: 6 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -66,24 +66,8 @@ jobs:
6666
run: cargo build
6767
working-directory: packages/mysql-on-sqlite/ext/wp-mysql-parser
6868

69-
- name: Run native parser smoke tests
70-
run: |
71-
php -d extension="$GITHUB_WORKSPACE/packages/mysql-on-sqlite/ext/wp-mysql-parser/target/debug/libwp_mysql_parser.so" -r '
72-
require "src/load.php";
73-
$lexer = new WP_MySQL_Lexer( "SELECT ID, post_title FROM wp_posts WHERE ID IN (1, 2, 3)" );
74-
if ( ! method_exists( $lexer, "native_token_stream" ) ) {
75-
fwrite( STDERR, "Native token stream is not available.\n" );
76-
exit( 1 );
77-
}
78-
$tokens = $lexer->remaining_tokens();
79-
$parser = new WP_MySQL_Parser( new WP_Parser_Grammar( include "src/mysql/mysql-grammar.php" ), $tokens );
80-
$ast = $parser->parse();
81-
if ( ! $ast instanceof WP_Parser_Node || "query" !== $ast->rule_name ) {
82-
fwrite( STDERR, "Native parser did not produce the expected query AST.\n" );
83-
exit( 1 );
84-
}
85-
'
86-
./vendor/bin/phpunit -c ./phpunit.xml.dist tests/mysql/WP_MySQL_Lexer_Tests.php tests/parser/WP_Parser_Node_Tests.php
69+
- name: Run PHPUnit tests with parser extension
70+
run: php -d extension="$GITHUB_WORKSPACE/packages/mysql-on-sqlite/ext/wp-mysql-parser/target/debug/libwp_mysql_parser.so" ./vendor/bin/phpunit -c ./phpunit.xml.dist
8771
working-directory: packages/mysql-on-sqlite
8872

8973
sqlite-driver-extension-tests:
@@ -152,5 +136,9 @@ jobs:
152136
}
153137
'
154138
139+
- name: Run PHPUnit tests with SQLite driver using parser extension
140+
run: php -d extension="$GITHUB_WORKSPACE/packages/mysql-on-sqlite/ext/wp-mysql-parser/target/debug/libwp_mysql_parser.so" ./vendor/bin/phpunit -c ./phpunit.xml.dist
141+
working-directory: packages/mysql-on-sqlite
142+
155143
- name: Run native SQLite facade smoke workload
156144
run: php -d extension="$GITHUB_WORKSPACE/packages/mysql-on-sqlite/ext/wp-mysql-parser/target/debug/libwp_mysql_parser.so" tmp-test-native/run-sqlite-facade-smoke.php

.github/workflows/wp-tests-phpunit.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,8 +54,8 @@ jobs:
5454
- name: Build and load parser extension in WordPress PHP containers
5555
run: bash .github/workflows/wp-tests-phpunit-native-extension-setup.sh
5656

57-
- name: Verify WordPress uses parser extension
58-
run: cd wordpress && node tools/local-env/scripts/docker.js run --rm php php /var/www/native-verify-extension.php
57+
- name: Run WordPress PHPUnit tests with parser extension
58+
run: node .github/workflows/wp-tests-phpunit-run.js
5959

6060
- name: Stop Docker containers
6161
if: always()

0 commit comments

Comments
 (0)