Changeset 58611 for branches/5.4/.github/workflows/coding-standards.yml
- Timestamp:
- 07/01/2024 07:17:07 PM (5 months ago)
- Location:
- branches/5.4
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/5.4
- Property svn:mergeinfo changed
/trunk merged: 49264,51673,52179,53552,53895,56464,57124-57125,57249,57918,58157
- Property svn:mergeinfo changed
-
branches/5.4/.github/workflows/coding-standards.yml
r55521 r58611 41 41 cancel-in-progress: true 42 42 43 # Disable permissions for all available scopes by default. 44 # Any needed permissions should be configured at the job level. 45 permissions: {} 46 43 47 jobs: 44 48 # Runs PHP coding standards checks. 45 #46 # Violations are reported inline with annotations.47 #48 # Performs the following steps:49 # - Checks out the repository.50 # - Sets up PHP.51 # - Logs debug information.52 # - Installs Composer dependencies (use cache if possible).53 # - Make Composer packages available globally.54 # - Logs PHP_CodeSniffer debug information.55 # - Runs PHPCS on the full codebase with warnings suppressed.56 # - Runs PHPCS on the `tests` directory without warnings suppressed.57 49 phpcs: 58 50 name: PHP coding standards 59 runs-on: ubuntu-latest 60 timeout-minutes: 20 51 uses: WordPress/wordpress-develop/.github/workflows/reusable-coding-standards-php.yml@trunk 52 permissions: 53 contents: read 61 54 if: ${{ github.repository == 'WordPress/wordpress-develop' || github.event_name == 'pull_request' }} 62 63 steps: 64 - name: Checkout repository 65 uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3.3.0 66 67 - name: Set up PHP 68 uses: shivammathur/setup-php@d30ad8b1843ace22e6698ab99bbafaa747b6bd0d # v2.24.0 69 with: 70 php-version: '7.3' 71 coverage: none 72 tools: composer, cs2pr 73 74 - name: Log debug information 75 run: | 76 php --version 77 composer --version 78 79 - name: Install Composer dependencies 80 uses: ramsey/composer-install@83af392bf5f031813d25e6fe4cd626cdba9a2df6 # v2.2.0 81 with: 82 composer-options: "--no-progress --no-ansi" 83 84 - name: Make Composer packages available globally 85 run: echo "${PWD}/vendor/bin" >> $GITHUB_PATH 86 87 - name: Log PHPCS debug information 88 run: phpcs -i 89 90 - name: Run PHPCBF on all Core files 91 run: phpcbf 92 93 - name: Run PHPCS on all Core files 94 run: phpcs -q -n --report=checkstyle | cs2pr 95 96 - name: Check test suite files for warnings 97 run: phpcs tests -q --report=checkstyle | cs2pr 55 with: 56 php-version: '7.3' 98 57 99 58 # Runs the JavaScript coding standards checks. 100 #101 # JSHint violations are not currently reported inline with annotations.102 #103 # Performs the following steps:104 # - Checks out the repository.105 # - Logs debug information about the GitHub Action runner.106 # - Installs Node.js.107 # - Logs updated debug information.108 # _ Installs npm dependencies.109 # - Run the WordPress JSHint checks.110 59 jshint: 111 60 name: JavaScript coding standards 112 runs-on: ubuntu-latest 113 timeout-minutes: 20 61 uses: WordPress/wordpress-develop/.github/workflows/reusable-coding-standards-javascript.yml@trunk 62 permissions: 63 contents: read 114 64 if: ${{ github.repository == 'WordPress/wordpress-develop' || github.event_name == 'pull_request' }} 115 env:116 PUPPETEER_SKIP_CHROMIUM_DOWNLOAD: ${{ true }}117 118 steps:119 - name: Checkout repository120 uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3.3.0121 122 - name: Log debug information123 run: |124 npm --version125 node --version126 git --version127 svn --version128 129 - name: Install Node.js130 uses: actions/setup-node@64ed1c7eab4cce3362f8c340dee64e5eaeef8f7c # v3.6.0131 with:132 node-version-file: '.nvmrc'133 cache: npm134 135 - name: Log debug information136 run: |137 npm --version138 node --version139 140 - name: Install Dependencies141 run: npm ci142 143 - name: Run JSHint144 run: npm run grunt jshint145 65 146 66 slack-notifications: 147 67 name: Slack Notifications 148 68 uses: WordPress/wordpress-develop/.github/workflows/slack-notifications.yml@trunk 69 permissions: 70 actions: read 71 contents: read 149 72 needs: [ phpcs, jshint ] 150 73 if: ${{ github.repository == 'WordPress/wordpress-develop' && github.event_name != 'pull_request' && always() }} … … 160 83 name: Failed workflow tasks 161 84 runs-on: ubuntu-latest 85 permissions: 86 actions: write 162 87 needs: [ phpcs, jshint, slack-notifications ] 163 88 if: | … … 173 98 steps: 174 99 - name: Dispatch workflow run 175 uses: actions/github-script@ 98814c53be79b1d30f795b907e553d8679345975 # v6.4.0100 uses: actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea # v7.0.1 176 101 with: 177 102 retries: 2
Note: See TracChangeset
for help on using the changeset viewer.