diff --git a/.github/workflows/plugin-check-local.yml b/.github/workflows/plugin-check-local.yml index 7dd4ec6..c07e5df 100644 --- a/.github/workflows/plugin-check-local.yml +++ b/.github/workflows/plugin-check-local.yml @@ -87,47 +87,14 @@ jobs: run: | touch .wp-env.json > .wp-env.json - echo "{ \"core\": $WP_VERSION, \"port\": 8880, \"testsPort\": 8881, \"plugins\": [ \"$PLUGIN_DIR\", \"https://downloads.wordpress.org/plugin/plugin-check.latest-stable.zip\", \"https://downloads.wordpress.org/plugin/glotpress.latest-stable.zip\" ] }" >> .wp-env.json + echo "{ \"core\": $WP_VERSION, \"port\": 8880, \"testsPort\": 8881, \"plugins\": [ \"https://downloads.wordpress.org/plugin/glotpress.latest-stable.zip\", \"$PLUGIN_DIR\", \"https://downloads.wordpress.org/plugin/plugin-check.latest-stable.zip\" ] }" >> .wp-env.json + + npx wp plugin install https://downloads.wordpress.org/plugin/plugin-check.latest-stable.zip --activate + npx wp plugin install https://downloads.wordpress.org/plugin/glotpress.latest-stable.zip --activate + npx wp plugin install $PLUGIN_DIR --activate npm -g --no-fund i @wordpress/env wp-env start --update shell: bash env: - WP_VERSION: 'null' - - - name: Run Plugin Check - run: | - CHECKS="${CHECKS//$'\n'/,}" - EXCLUDE_CHECKS="${EXCLUDE_CHECKS//$'\n'/,}" - CATEGORIES="${CATEGORIES//$'\n'/,}" - EXCLUDE_DIRS="${EXCLUDE_DIRS//$'\n'/,}" - ADDITIONAL_ARGS="$CHECKS $EXCLUDE_CHECKS $CATEGORIES $IGNORE_WARNINGS $IGNORE_ERRORS $INCLUDE_EXPERIMENTAL $EXCLUDE_DIRS" - - # TODO: Install dependencies first, see https://github.com/wordpress/plugin-check-action/issues/66 - # Get plugin dependencies - wp-env run cli wp plugin get $PLUGIN_SLUG --field=requires_plugins --format=json - wp-env run cli wp plugin activate $PLUGIN_SLUG - - # Debugging information - wp-env run cli wp plugin list - wp-env run cli wp plugin list-checks - wp-env run cli wp plugin list-check-categories - - # Run Plugin Check - wp-env run cli wp plugin check $PLUGIN_SLUG --format=json $ADDITIONAL_ARGS --require=./wp-content/plugins/plugin-check/cli.php > ${{ runner.temp }}/plugin-check-results.txt - shell: bash - env: - CHECKS: '' - EXCLUDE_CHECKS: '' - CATEGORIES: '' - EXCLUDE_DIRS: '' - IGNORE_WARNINGS: '' - IGNORE_ERRORS: '' - INCLUDE_EXPERIMENTAL: '' - - - name: Process results - run: | - node ../../actions/plugin-check-action/dist/index.js ${{ runner.temp }}/plugin-check-results.txt - shell: bash - env: - INPUT_REPO_TOKEN: ${{ github.token }} + WP_VERSION: 'latest'