Changeset 58597 for branches/5.8/.github/workflows/coding-standards.yml
- Timestamp:
- 06/28/2024 06:40:36 PM (11 months ago)
- Location:
- branches/5.8
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/5.8
- Property svn:mergeinfo changed
/trunk merged: 52179,53552,53895,56113-56114,57124-57125,57249,57918,58157
- Property svn:mergeinfo changed
-
branches/5.8/.github/workflows/coding-standards.yml
r55517 r58597 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 # - Ensures version-controlled files are not modified or deleted.58 # - todo: Configure Slack notifications for failing scans.59 49 phpcs: 60 50 name: PHP coding standards 61 runs-on: ubuntu-latest 62 timeout-minutes: 20 51 uses: WordPress/wordpress-develop/.github/workflows/reusable-coding-standards-php.yml@trunk 52 permissions: 53 contents: read 63 54 if: ${{ github.repository == 'WordPress/wordpress-develop' || github.event_name == 'pull_request' }} 64 65 steps: 66 - name: Checkout repository 67 uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3.3.0 68 69 - name: Set up PHP 70 uses: shivammathur/setup-php@d30ad8b1843ace22e6698ab99bbafaa747b6bd0d # v2.24.0 71 with: 72 php-version: '7.4' 73 coverage: none 74 tools: composer, cs2pr 75 76 - name: Log debug information 77 run: | 78 php --version 79 composer --version 80 81 - name: Install Composer dependencies 82 uses: ramsey/composer-install@83af392bf5f031813d25e6fe4cd626cdba9a2df6 # v2.2.0 83 with: 84 composer-options: "--no-progress --no-ansi" 85 86 - name: Make Composer packages available globally 87 run: echo "${PWD}/vendor/bin" >> $GITHUB_PATH 88 89 - name: Log PHPCS debug information 90 run: phpcs -i 91 92 - name: Run PHPCS on all Core files 93 run: phpcs -q -n --report=checkstyle | cs2pr 94 95 - name: Check test suite files for warnings 96 run: phpcs tests -q --report=checkstyle | cs2pr 97 98 - name: Ensure version-controlled files are not modified during the tests 99 run: git diff --exit-code 55 with: 56 php-version: '7.4' 100 57 101 58 # Runs the JavaScript coding standards checks. 102 #103 # JSHint violations are not currently reported inline with annotations.104 #105 # Performs the following steps:106 # - Checks out the repository.107 # - Logs debug information about the GitHub Action runner.108 # - Installs Node.js.109 # - Logs updated debug information.110 # _ Installs npm dependencies.111 # - Run the WordPress JSHint checks.112 # - Ensures version-controlled files are not modified or deleted.113 59 jshint: 114 60 name: JavaScript coding standards 115 runs-on: ubuntu-latest 116 timeout-minutes: 20 61 uses: WordPress/wordpress-develop/.github/workflows/reusable-coding-standards-javascript.yml@trunk 62 permissions: 63 contents: read 117 64 if: ${{ github.repository == 'WordPress/wordpress-develop' || github.event_name == 'pull_request' }} 118 env:119 PUPPETEER_SKIP_CHROMIUM_DOWNLOAD: ${{ true }}120 121 steps:122 - name: Checkout repository123 uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3.3.0124 125 - name: Log debug information126 run: |127 npm --version128 node --version129 git --version130 svn --version131 132 - name: Install Node.js133 uses: actions/setup-node@64ed1c7eab4cce3362f8c340dee64e5eaeef8f7c # v3.6.0134 with:135 node-version-file: '.nvmrc'136 cache: npm137 138 - name: Log debug information139 run: |140 npm --version141 node --version142 143 - name: Install Dependencies144 run: npm ci145 146 - name: Run JSHint147 run: npm run grunt jshint148 149 - name: Ensure version-controlled files are not modified or deleted150 run: git diff --exit-code151 65 152 66 slack-notifications: 153 67 name: Slack Notifications 154 68 uses: WordPress/wordpress-develop/.github/workflows/slack-notifications.yml@trunk 69 permissions: 70 actions: read 71 contents: read 155 72 needs: [ phpcs, jshint ] 156 73 if: ${{ github.repository == 'WordPress/wordpress-develop' && github.event_name != 'pull_request' && always() }} … … 166 83 name: Failed workflow tasks 167 84 runs-on: ubuntu-latest 85 permissions: 86 actions: write 168 87 needs: [ phpcs, jshint, slack-notifications ] 169 88 if: | … … 176 95 needs.jshint.result == 'cancelled' || needs.jshint.result == 'failure' 177 96 ) 178 179 97 steps: 180 98 - name: Dispatch workflow run 181 uses: actions/github-script@ 98814c53be79b1d30f795b907e553d8679345975 # v6.4.099 uses: actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea # v7.0.1 182 100 with: 183 101 retries: 2
Note: See TracChangeset
for help on using the changeset viewer.