Changeset 53604 for branches/5.1/.github/workflows/coding-standards.yml
- Timestamp:
- 06/30/2022 04:41:47 PM (3 years ago)
- Location:
- branches/5.1
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/5.1
- Property svn:mergeinfo changed
/trunk merged: 50704,50796,50930,51341,51355,51498,51511,51535,51921,51924-51925,51937,52002,52130,52183,52233,53112,53581-53582,53592
- Property svn:mergeinfo changed
-
branches/5.1/.github/workflows/coding-standards.yml
r50622 r53604 6 6 push: 7 7 branches: 8 - master9 8 - trunk 10 9 - '3.[89]' … … 15 14 pull_request: 16 15 branches: 17 - master18 16 - trunk 19 17 - '3.[89]' … … 35 33 workflow_dispatch: 36 34 35 # Cancels all previous workflow runs for pull requests that have not completed. 36 concurrency: 37 # The concurrency group contains the workflow name and the branch name for pull requests 38 # or the commit hash for any other events. 39 group: ${{ github.workflow }}-${{ github.event_name == 'pull_request' && github.head_ref || github.sha }} 40 cancel-in-progress: true 41 37 42 jobs: 38 43 # Runs PHP coding standards checks. … … 49 54 # - Runs PHPCS on the full codebase with warnings suppressed. 50 55 # - Runs PHPCS on the `tests` directory without warnings suppressed. 51 # - todo: Configure Slack notifications for failing scans.52 56 phpcs: 53 57 name: PHP coding standards … … 57 61 steps: 58 62 - name: Checkout repository 59 uses: actions/checkout@ 5a4ac9002d0be2fb38bd78e4b4dbde5606d7042f # v2.3.463 uses: actions/checkout@2541b1294d2704b0964813337f33b291d3f8596b # v3.0.2 60 64 61 65 - name: Set up PHP 62 uses: shivammathur/setup-php@ afefcaf556d98dc7896cca380e181decb609ca44 # v2.10.066 uses: shivammathur/setup-php@3eda58347216592f618bb1dff277810b6698e4ca # v2.19.1 63 67 with: 64 68 php-version: '7.2' … … 72 76 73 77 - name: Install Composer dependencies 74 uses: ramsey/composer-install@ 92a7904348d4ad30236f3611e33b7f0c6f9edd70 # v1.1.078 uses: ramsey/composer-install@f680dac46551dffb2234a240d65ae806c2999dd6 # v2.1.0 75 79 with: 76 80 composer-options: "--no-progress --no-ansi --no-interaction" … … 91 95 # Performs the following steps: 92 96 # - Checks out the repository. 93 # - Logs debug information about the runner container. 94 # - Installs NodeJS 14. 95 # - Sets up caching for NPM. 97 # - Logs debug information about the GitHub Action runner. 98 # - Installs NodeJS. 96 99 # - Logs updated debug information. 97 # _ Installs NPM dependencies using install-changed to hash the `package.json` file.100 # _ Installs NPM dependencies. 98 101 # - Run the WordPress JSHint checks. 99 # - todo: Configure Slack notifications for failing tests.100 102 jshint: 101 103 name: JavaScript coding standards 102 104 runs-on: ubuntu-latest 105 timeout-minutes: 20 103 106 if: ${{ github.repository == 'WordPress/wordpress-develop' || github.event_name == 'pull_request' }} 104 107 env: … … 107 110 steps: 108 111 - name: Checkout repository 109 uses: actions/checkout@ 5a4ac9002d0be2fb38bd78e4b4dbde5606d7042f # v2.3.4112 uses: actions/checkout@2541b1294d2704b0964813337f33b291d3f8596b # v3.0.2 110 113 111 114 - name: Log debug information … … 117 120 118 121 - name: Install NodeJS 119 uses: actions/setup-node@ 46071b5c7a2e0c34e49c3cb8a0e792e86e18d5ea # v2.1.5122 uses: actions/setup-node@eeb10cff27034e7acf239c5d29f62154018672fd # v3.3.0 120 123 with: 121 node-version: 14 122 123 - name: Cache NodeJS modules 124 uses: actions/cache@26968a09c0ea4f3e233fdddbafd1166051a095f6 # v2.1.4 125 env: 126 cache-name: cache-node-modules 127 with: 128 # npm cache files are stored in `~/.npm` on Linux/macOS 129 path: ~/.npm 130 key: ${{ runner.os }}-npm-${{ hashFiles('**/package-lock.json') }} 124 node-version-file: '.nvmrc' 125 cache: npm 131 126 132 127 - name: Log debug information … … 140 135 - name: Run JSHint 141 136 run: npm run grunt jshint 137 138 slack-notifications: 139 name: Slack Notifications 140 uses: WordPress/wordpress-develop/.github/workflows/slack-notifications.yml@trunk 141 needs: [ phpcs, jshint ] 142 if: ${{ github.repository == 'WordPress/wordpress-develop' && github.event_name != 'pull_request' && always() }} 143 with: 144 calling_status: ${{ needs.phpcs.result == 'success' && needs.jshint.result == 'success' && 'success' || ( needs.phpcs.result == 'cancelled' || needs.jshint.result == 'cancelled' ) && 'cancelled' || 'failure' }} 145 secrets: 146 SLACK_GHA_SUCCESS_WEBHOOK: ${{ secrets.SLACK_GHA_SUCCESS_WEBHOOK }} 147 SLACK_GHA_CANCELLED_WEBHOOK: ${{ secrets.SLACK_GHA_CANCELLED_WEBHOOK }} 148 SLACK_GHA_FIXED_WEBHOOK: ${{ secrets.SLACK_GHA_FIXED_WEBHOOK }} 149 SLACK_GHA_FAILURE_WEBHOOK: ${{ secrets.SLACK_GHA_FAILURE_WEBHOOK }}
Note: See TracChangeset
for help on using the changeset viewer.