Changeset 50441 for trunk/.github/workflows/phpunit-tests.yml
- Timestamp:
- 02/26/2021 02:07:53 PM (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/.github/workflows/phpunit-tests.yml
r50436 r50441 20 20 21 21 env: 22 LOCAL_DIR: build23 22 PUPPETEER_SKIP_CHROMIUM_DOWNLOAD: ${{ true }} 24 23 COMPOSER_INSTALL: ${{ false }} … … 28 27 29 28 jobs: 30 # Sets up WordPress for testing or development use.29 # Sets up the workflow for testing. 31 30 # 32 31 # Performs the following steps: 33 32 # - Cancels all previous workflow runs for pull requests that have not completed. 34 # - Checks out the repository. 35 # - Logs debug information about the runner container. 36 # - Installs NodeJS 14. 37 # - Sets up caching for NPM. 38 # _ Installs NPM dependencies using install-changed to hash the `package.json` file. 39 # - Builds WordPress to run from the `build` directory. 40 # - Creates a ZIP file of compiled WordPress. 41 # - Uploads ZIP file as an artifact. 42 setup-wordpress: 43 name: Setup WordPress 33 setup-workflow: 34 name: Setup Workflow 44 35 runs-on: ubuntu-latest 45 36 if: ${{ github.repository == 'WordPress/wordpress-develop' || github.event_name == 'pull_request' }} … … 51 42 with: 52 43 access_token: ${{ github.token }} 53 54 - name: Checkout repository55 uses: actions/checkout@v256 57 - name: Log debug information58 run: |59 echo "$GITHUB_REF"60 echo "$GITHUB_EVENT_NAME"61 npm --version62 node --version63 curl --version64 git --version65 svn --version66 php --version67 php -i68 locale -a69 70 - name: Install NodeJS71 uses: actions/setup-node@v272 with:73 node-version: 1474 75 - name: Cache NodeJS modules76 uses: actions/cache@v277 env:78 cache-name: cache-node-modules79 with:80 # npm cache files are stored in `~/.npm` on Linux/macOS81 path: ~/.npm82 key: ${{ runner.os }}-npm-${{ hashFiles('**/package-lock.json') }}83 84 - name: Install Dependencies85 run: npx install-changed --install-command="npm ci"86 87 - name: Build WordPress88 run: npm run build89 90 - name: Create ZIP artifact91 uses: thedoctor0/zip-release@0.4.192 with:93 filename: built-wp-${{ github.sha }}.zip94 exclusions: '*.git* /*node_modules/* packagehash.txt'95 96 - name: Upload build artifact97 uses: actions/upload-artifact@v298 with:99 name: built-wp-${{ github.sha }}100 path: built-wp-${{ github.sha }}.zip101 if-no-files-found: error102 44 103 45 # Runs the PHPUnit tests for WordPress. … … 106 48 # - Set environment variables. 107 49 # - Sets up the environment variables needed for testing with memcached (if desired). 108 # - Downloads the built WordPress artifact from the previous job.109 # - Unzips the artifact.110 50 # - Installs NodeJS 14. 111 51 # - Sets up caching for NPM. 112 # _ Installs NPM dependencies using install-changed to hash the `package.json` file.52 # - Installs NPM dependencies 113 53 # - Configures caching for Composer. 114 # _Installs Composer dependencies (if desired).54 # - Installs Composer dependencies (if desired). 115 55 # - Logs Docker debug information (about both the Docker installation within the runner). 116 56 # - Starts the WordPress Docker container. … … 128 68 test-php: 129 69 name: ${{ matrix.php }}${{ matrix.multisite && ' multisite' || '' }}${{ matrix.memcached && ' with memcached' || '' }} on ${{ matrix.os }} 130 needs: setup-wordpress131 70 runs-on: ${{ matrix.os }} 132 71 strategy: … … 164 103 echo "PHP_FPM_GID=$(id -g)" >> $GITHUB_ENV 165 104 166 - name: Download the built WordPress artifact 167 uses: actions/download-artifact@v2 168 with: 169 name: built-wp-${{ github.sha }} 170 171 - name: Unzip built artifact 172 run: unzip built-wp-${{ github.sha }}.zip 105 - name: Checkout repository 106 uses: actions/checkout@v2 173 107 174 108 - name: Install NodeJS … … 231 165 if: ${{ matrix.memcached }} 232 166 run: | 233 cp tests/phpunit/includes/object-cache.php build/wp-content/object-cache.php167 cp tests/phpunit/includes/object-cache.php src/wp-content/object-cache.php 234 168 docker run --name memcached --net $(basename "$PWD")_wpdevnet -d memcached 235 169
Note: See TracChangeset
for help on using the changeset viewer.