Issue-44: PHP Warning: Undefined array key \"linkDestination\" in class-image.php
#103
Workflow file for this run
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: Unit Tests | |
| on: | |
| pull_request: | |
| jobs: | |
| tests: | |
| runs-on: ubuntu-latest | |
| services: | |
| mysql: | |
| image: mysql:5.7 | |
| env: | |
| MYSQL_ALLOW_EMPTY_PASSWORD: yes | |
| ports: | |
| - 3306:3306 | |
| options: --health-cmd="mysqladmin ping" --health-interval=10s --health-timeout=5s --health-retries=3 | |
| continue-on-error: ${{ matrix.can_fail }} | |
| strategy: | |
| fail-fast: true | |
| matrix: | |
| wp_version: ["latest"] | |
| can_fail: [false] | |
| multisite: [0,1] | |
| name: phpunit 8.3 @ WP ${{ matrix.wp_version }} WP_MULTISITE=${{ matrix.multisite }} | |
| env: | |
| CACHEDIR: /tmp/test-cache | |
| WP_CORE_DIR: /tmp/wordpress/ | |
| WP_TESTS_DIR: /tmp/wordpress-tests-lib | |
| WP_VERSION: ${{ matrix.wp_version }} | |
| WP_MULTISITE: ${{ matrix.multisite }} | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v2 | |
| - name: Get Composer cache directory | |
| id: composer-cache | |
| run: echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT | |
| - name: Set up Composer caching | |
| uses: actions/cache@v3 | |
| env: | |
| cache-name: cache-composer-dependencies | |
| with: | |
| path: | | |
| ${{ steps.composer-cache.outputs.dir }} | |
| /tmp/test-cache | |
| /tmp/wordpress | |
| key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }} | |
| restore-keys: | | |
| ${{ runner.os }}-composer- | |
| - name: Setup PHP | |
| uses: shivammathur/setup-php@v2 | |
| with: | |
| php-version: '8.3' | |
| extensions: dom, curl, libxml, mbstring, zip, pcntl, pdo, sqlite, pdo_sqlite, gd | |
| tools: composer:v2 | |
| coverage: none | |
| - name: Validate Composer | |
| run: composer validate --strict | |
| - name: Install composer dependencies | |
| uses: nick-invision/retry@v1 | |
| with: | |
| timeout_minutes: 5 | |
| max_attempts: 5 | |
| command: composer install | |
| - name: Install Subversion | |
| run: sudo apt-get update && sudo apt-get install -y subversion | |
| - name: Install WordPress and Copy Project | |
| shell: bash | |
| run: | | |
| bash <(curl -s "https://raw.githubusercontent.com/wp-cli/sample-plugin/HEAD/bin/install-wp-tests.sh") wordpress_test root '' 127.0.0.1 latest | |
| rm -rf "${WP_CORE_DIR}wp-content/plugins" | |
| mkdir -p "${WP_CORE_DIR}wp-content/plugins/wp-component-library" | |
| rsync -a --exclude=.git . "${WP_CORE_DIR}wp-content/plugins/wp-component-library" | |
| - name: Test Plugin | |
| shell: bash | |
| run: | | |
| cd ${WP_CORE_DIR}wp-content/plugins/wp-component-library | |
| composer phpunit |