fix(connection): probe Bearer too, so a half-stripped host stops read… #168
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: CI | |
| on: | |
| push: | |
| branches: [ main, master ] | |
| pull_request: | |
| jobs: | |
| lint: | |
| name: PHPCS (WPCS + PHP compat) | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: shivammathur/setup-php@v2 | |
| with: | |
| php-version: '8.3' | |
| coverage: none | |
| tools: composer | |
| - name: Install dependencies | |
| run: composer install --no-interaction --no-progress | |
| - name: Lint | |
| run: composer lint | |
| test: | |
| name: PHPUnit (PHP ${{ matrix.php }}, WP ${{ matrix.wp }}) | |
| runs-on: ubuntu-latest | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| # PHP 7.4 is the plugin's runtime floor and is asserted by | |
| # PHPCompatibility in the lint job (testVersion 7.4-); the PHPUnit | |
| # toolchain (phpunit 9.6 → doctrine/instantiator 2) requires 8.1+, so | |
| # the integration suite runs on 8.1+. | |
| php: [ '8.1', '8.2', '8.3' ] | |
| wp: [ '6.9', 'latest' ] | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: shivammathur/setup-php@v2 | |
| with: | |
| php-version: ${{ matrix.php }} | |
| coverage: none | |
| extensions: pdo, sqlite3, pdo_sqlite | |
| tools: composer | |
| - name: Install dependencies | |
| run: composer install --no-interaction --no-progress | |
| # The PHPUnit suite is a real WordPress integration suite driven through | |
| # the SQLite drop-in (see tests/bootstrap.php). Provision a throwaway WP | |
| # core + the SQLite engine and point the bootstrap at them via env. | |
| - name: Provision WordPress core + SQLite drop-in | |
| env: | |
| WP_VERSION: ${{ matrix.wp }} | |
| run: | | |
| set -euo pipefail | |
| WP_DIR="${RUNNER_TEMP}/wp" | |
| mkdir -p "$WP_DIR/wp-content/mu-plugins" | |
| if [ "$WP_VERSION" = "latest" ]; then | |
| WP_URL="https://wordpress.org/latest.tar.gz" | |
| else | |
| WP_URL="https://wordpress.org/wordpress-${WP_VERSION}.tar.gz" | |
| fi | |
| curl -sSL "$WP_URL" | tar xz -C "$WP_DIR" --strip-components=1 | |
| curl -sSL "https://downloads.wordpress.org/plugin/sqlite-database-integration.latest-stable.zip" -o "${RUNNER_TEMP}/sqlite.zip" | |
| unzip -q "${RUNNER_TEMP}/sqlite.zip" -d "$WP_DIR/wp-content/mu-plugins" | |
| cp "$WP_DIR/wp-content/mu-plugins/sqlite-database-integration/db.copy" "$WP_DIR/wp-content/db.php" | |
| echo "SADDLE_TEST_ABSPATH=${WP_DIR}/" >> "$GITHUB_ENV" | |
| echo "SADDLE_SQLITE_SRC=${WP_DIR}/wp-content" >> "$GITHUB_ENV" | |
| - name: Test | |
| run: composer test |