Changeset 50324 for branches/3.7/.github/workflows/coding-standards.yml
- Timestamp:
- 02/12/2021 08:58:21 PM (4 years ago)
- Location:
- branches/3.7
- Files:
-
- 1 added
- 2 edited
- 1 copied
Legend:
- Unmodified
- Added
- Removed
-
branches/3.7
- Property svn:mergeinfo changed
/trunk merged: 49162,49168-49169,49175,49204,49227-49228,49244,49369,49371,49548,49781-49784,49786,49836,49938,50268,50285,50298
- Property svn:mergeinfo changed
-
branches/3.7/.github/workflows/coding-standards.yml
r49162 r50324 5 5 branches: 6 6 - master 7 # JSHint was introduced in WordPress 3.8. 7 8 # PHPCS checking was introduced in WordPress 5.1. 8 - '5.[1-9]' 9 - '[6-9].*' 9 - '3.[89]' 10 - '[4-9].[0-9]' 11 tags: 12 - '3.[89]*' 13 - '[4-9].[0-9]*' 10 14 pull_request: 11 15 … … 17 21 # Performs the following steps: 18 22 # - Checks out the repository. 19 # - Configures caching for Composer.20 23 # - Sets up PHP. 21 24 # - Logs debug information. 22 # - Installs Composer dependencies (from cache if possible). 25 # - Installs Composer dependencies (use cache if possible). 26 # - Make Composer packages available globally. 23 27 # - Logs PHP_CodeSniffer debug information. 24 28 # - Runs PHPCS on the full codebase with warnings suppressed. … … 28 32 name: PHP coding standards 29 33 runs-on: ubuntu-latest 34 if: ${{ github.repository == 'WordPress/wordpress-develop' || github.event_name == 'pull_request' }} 35 30 36 steps: 31 37 - name: Checkout repository 32 38 uses: actions/checkout@v2 33 34 - name: Get Composer cache directory35 id: composer-cache36 run: echo "::set-output name=dir::$(composer config cache-files-dir)"37 38 - name: Set up Composer caching39 uses: actions/cache@v240 env:41 cache-name: cache-composer-dependencies42 with:43 path: ${{ steps.composer-cache.outputs.dir }}44 key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}45 restore-keys: |46 ${{ runner.os }}-composer-47 39 48 40 - name: Set up PHP … … 59 51 60 52 - name: Install Composer dependencies 61 run: | 62 composer install --prefer-dist --no-suggest --no-progress --no-ansi --no-interaction 63 echo "vendor/bin" >> $GITHUB_PATH 53 uses: ramsey/composer-install@v1 54 with: 55 composer-options: "--no-progress --no-ansi --no-interaction" 56 57 - name: Make Composer packages available globally 58 run: echo "${PWD}/vendor/bin" >> $GITHUB_PATH 64 59 65 60 - name: Log PHPCS debug information … … 67 62 68 63 - name: Run PHPCS on all Core files 69 run: vendor/bin/phpcs -q -n --report=checkstyle | cs2pr64 run: phpcs -q -n --report=checkstyle | cs2pr 70 65 71 66 - name: Check test suite files for warnings 72 run: vendor/bin/phpcs tests -q --report=checkstyle | cs2pr67 run: phpcs tests -q --report=checkstyle | cs2pr 73 68 74 69 # Runs the JavaScript coding standards checks. 70 # 71 # JSHint violations are not currently reported inline with annotations. 75 72 # 76 73 # Performs the following steps: 77 74 # - Checks out the repository. 78 75 # - Logs debug information about the runner container. 79 # - Installs NodeJS 1 2 (todo: install the version of NPM specified in the `.nvmrc` file to support older branches)76 # - Installs NodeJS 14. 80 77 # - Sets up caching for NPM. 81 78 # - Logs updated debug information. 82 # _ Installs NPM dependencies .79 # _ Installs NPM dependencies using install-changed to hash the `package.json` file. 83 80 # - Run the WordPress JSHint checks. 84 81 # - todo: Configure Slack notifications for failing tests. … … 86 83 name: JavaScript coding standards 87 84 runs-on: ubuntu-latest 85 if: ${{ github.repository == 'WordPress/wordpress-develop' || github.event_name == 'pull_request' }} 86 env: 87 PUPPETEER_SKIP_CHROMIUM_DOWNLOAD: ${{ true }} 88 88 89 steps: 89 90 - name: Checkout repository … … 100 101 uses: actions/setup-node@v1 101 102 with: 102 node-version: 1 2103 node-version: 14 103 104 104 105 - name: Cache NodeJS modules … … 119 120 120 121 - name: Install Dependencies 121 run: np m ci122 run: npx install-changed --install-command="npm ci" 122 123 123 124 - name: Run JSHint
Note: See TracChangeset
for help on using the changeset viewer.