Repository navigation
feat(logging): add a search bar to the All Logs page #456
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
| # Runs WordPress Plugin Check on modified plugins to ensure compliance with | |
| # WordPress.org guidelines and coding standards. | |
| # | |
| # https://wordpress.org/plugins/plugin-check/ | |
| name: Plugin Check | |
| on: | |
| push: | |
| branches: | |
| - main | |
| paths: | |
| - 'plugins/**' | |
| pull_request: | |
| branches: | |
| - main | |
| paths: | |
| - 'plugins/**' | |
| # Read-only, so plugin-check-action can't post its report as a PR comment. Results stay | |
| # in the job log and the uploaded artifact. | |
| permissions: | |
| contents: read | |
| jobs: | |
| detect-plugins: | |
| runs-on: ubuntu-latest | |
| name: Detect modified plugins | |
| outputs: | |
| plugins: ${{ steps.detect.outputs.plugins }} | |
| has-plugins: ${{ steps.detect.outputs.has-plugins }} | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| with: | |
| # get_plugin_slug.sh diffs against history, so fetch all of it without file contents. | |
| fetch-depth: 0 | |
| # Skip the example sites' uploads.zip files (590 MB), which plugin jobs don't use. | |
| filter: blob:none | |
| sparse-checkout-cone-mode: false | |
| sparse-checkout: | | |
| /* | |
| !**/wp-env/uploads.zip | |
| - name: Get changed plugin directories | |
| id: plugin | |
| run: | | |
| if [ "${{ github.event_name }}" = "push" ]; then | |
| bash .github/scripts/get_plugin_slug.sh main | |
| else | |
| bash .github/scripts/get_plugin_slug.sh \ | |
| ${{ github.event.pull_request.base.sha }} \ | |
| ${{ github.event.pull_request.head.sha }} | |
| fi | |
| - name: Set output | |
| id: detect | |
| # Pass the values through env so the shell doesn't strip the quotes in | |
| # the JSON array. | |
| env: | |
| SLUG: ${{ steps.plugin.outputs.slug }} | |
| PLUGINS: ${{ steps.plugin.outputs.plugins }} | |
| HAS_PLUGINS: ${{ steps.plugin.outputs.has-plugins }} | |
| run: | | |
| # get_plugin_slug.sh outputs: slug, plugins (JSON array), has-plugins | |
| if [ -z "$SLUG" ]; then | |
| echo "plugins=[]" >> "$GITHUB_OUTPUT" | |
| echo "has-plugins=false" >> "$GITHUB_OUTPUT" | |
| exit 0 | |
| fi | |
| echo "plugins=$PLUGINS" >> "$GITHUB_OUTPUT" | |
| echo "has-plugins=$HAS_PLUGINS" >> "$GITHUB_OUTPUT" | |
| plugin-check: | |
| needs: detect-plugins | |
| if: needs.detect-plugins.outputs.has-plugins == 'true' | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: | |
| plugin: ${{ fromJson(needs.detect-plugins.outputs.plugins) }} | |
| fail-fast: false | |
| name: ${{ matrix.plugin }} | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| with: | |
| # Skip the example sites' uploads.zip files (590 MB), which plugin jobs don't use. | |
| filter: blob:none | |
| sparse-checkout-cone-mode: false | |
| sparse-checkout: | | |
| /* | |
| !**/wp-env/uploads.zip | |
| - name: Setup PHP and install production dependencies | |
| uses: ./.github/actions/setup-php-composer | |
| with: | |
| php-version: '8.2' # Note: All plugins are compatible with PHP 8.2 | |
| working-directory: plugins/${{ matrix.plugin }} | |
| composer-options: '--no-progress --optimize-autoloader --no-dev' | |
| # Check what ships, not the source tree. composer archive applies the plugin's | |
| # archive.exclude list, the same as release-plugin.yml. | |
| - name: Build plugin archive | |
| working-directory: plugins/${{ matrix.plugin }} | |
| env: | |
| SLUG: ${{ matrix.plugin }} | |
| run: | | |
| composer archive --format=zip --file="plugin-build/$SLUG" --dir="." | |
| mkdir -p "$RUNNER_TEMP/plugin-check/$SLUG" | |
| unzip -q "plugin-build/$SLUG.zip" -d "$RUNNER_TEMP/plugin-check/$SLUG" | |
| - name: Run Plugin Check | |
| uses: wordpress/plugin-check-action@v1 | |
| with: | |
| build-dir: ${{ runner.temp }}/plugin-check/${{ matrix.plugin }} | |
| # No token, no PR comment. | |
| repo-token: '' | |
| exclude-directories: | | |
| vendor | |
| # The plugins ship through GitHub Releases and Composer, not WordPress.org, | |
| # so the Update URI header is intentional. | |
| ignore-codes: | | |
| plugin_updater_detected | |
| ignore-warnings: true | |
| include-experimental: false |