Changeset 53603 for branches/5.2/.github/workflows/phpunit-tests.yml
- Timestamp:
- 06/30/2022 04:40:40 PM (2 years ago)
- Location:
- branches/5.2
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/5.2
- 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.2/.github/workflows/phpunit-tests.yml
r51846 r53603 4 4 push: 5 5 branches: 6 - master7 6 - trunk 8 7 - '3.[7-9]' … … 13 12 pull_request: 14 13 branches: 15 - master16 14 - trunk 17 15 - '3.[7-9]' … … 22 20 - cron: '0 0 * * 0' 23 21 22 # Cancels all previous workflow runs for pull requests that have not completed. 23 concurrency: 24 # The concurrency group contains the workflow name and the branch name for pull requests 25 # or the commit hash for any other events. 26 group: ${{ github.workflow }}-${{ github.event_name == 'pull_request' && github.head_ref || github.sha }} 27 cancel-in-progress: true 28 24 29 env: 25 30 PUPPETEER_SKIP_CHROMIUM_DOWNLOAD: ${{ true }} … … 30 35 31 36 jobs: 32 # Sets up the workflow for testing.33 #34 # Performs the following steps:35 # - Cancels all previous workflow runs for pull requests that have not completed.36 setup-workflow:37 name: Setup Workflow38 runs-on: ubuntu-latest39 if: ${{ github.repository == 'WordPress/wordpress-develop' || github.event_name == 'pull_request' }}40 41 steps:42 - name: Cancel previous runs of this workflow (pull requests only)43 if: ${{ github.event_name == 'pull_request' }}44 uses: styfle/cancel-workflow-action@3d86a7cc43670094ac248017207be0295edbc31d # v0.8.045 46 37 # Runs the PHPUnit tests for WordPress. 47 38 # 48 39 # Performs the following steps: 49 # - Set environment variables.40 # - Sets environment variables. 50 41 # - Sets up the environment variables needed for testing with memcached (if desired). 51 # - Installs NodeJS 14. 52 # - Sets up caching for NPM. 42 # - Installs NodeJS. 53 43 # - Installs NPM dependencies 54 44 # - Configures caching for Composer. 55 # - Installs Composer dependencies (if desired).56 # - Logs Docker debug information (about boththe Docker installation within the runner).45 # - Installs Composer dependencies. 46 # - Logs Docker debug information (about the Docker installation within the runner). 57 47 # - Starts the WordPress Docker container. 58 # - Starts the memcached server after the Docker network has been created (if desired). 59 # - Logs WordPress Docker container debug information. 60 # - Logs debug general information. 48 # - Starts the Memcached server after the Docker network has been created (if desired). 49 # - Logs general debug information about the runner. 61 50 # - Logs the running Docker containers. 51 # - Logs debug information from inside the WordPress Docker container. 62 52 # - Logs debug information about what's installed within the WordPress Docker containers. 63 53 # - Install WordPress within the Docker container. … … 66 56 # - Reconnect the directory to the Git repository. 67 57 # - Submit the test results to the WordPress.org host test results. 68 # - todo: Configure Slack notifications for failing tests.69 58 test-php: 70 name: ${{ matrix.php }}${{ matrix.multisite && ' multisite' || '' }}${{ matrix.split_slow && ' slow tests' || '' }} ${{ matrix.memcached && ' with memcached' || '' }} on ${{ matrix.os }} 71 needs: setup-workflow 59 name: ${{ matrix.php }}${{ matrix.multisite && ' multisite' || '' }}${{ matrix.split_slow && ' slow tests' || '' }}${{ matrix.memcached && ' with memcached' || '' }} on ${{ matrix.os }} 72 60 runs-on: ${{ matrix.os }} 61 timeout-minutes: 20 73 62 if: ${{ github.repository == 'WordPress/wordpress-develop' || github.event_name == 'pull_request' }} 74 63 strategy: … … 118 107 119 108 - name: Checkout repository 120 uses: actions/checkout@ 5a4ac9002d0be2fb38bd78e4b4dbde5606d7042f # v2.3.4109 uses: actions/checkout@2541b1294d2704b0964813337f33b291d3f8596b # v3.0.2 121 110 122 111 - name: Install NodeJS 123 uses: actions/setup-node@ 46071b5c7a2e0c34e49c3cb8a0e792e86e18d5ea # v2.1.5112 uses: actions/setup-node@eeb10cff27034e7acf239c5d29f62154018672fd # v3.3.0 124 113 with: 125 node-version: 14 126 127 - name: Use cached Node modules 128 uses: actions/cache@26968a09c0ea4f3e233fdddbafd1166051a095f6 # v2.1.4 129 env: 130 cache-name: cache-node-modules 131 with: 132 # npm cache files are stored in `~/.npm` on Linux/macOS 133 path: ~/.npm 134 key: ${{ runner.os }}-npm-${{ hashFiles('**/package-lock.json') }} 114 node-version-file: '.nvmrc' 115 cache: npm 135 116 136 117 - name: Install Dependencies … … 142 123 143 124 - name: Cache Composer dependencies 144 uses: actions/cache@ 26968a09c0ea4f3e233fdddbafd1166051a095f6 # v2.1.4125 uses: actions/cache@c3f1317a9e7b1ef106c153ac8c0f00fed3ddbc0d # v3.0.4 145 126 env: 146 127 cache-name: cache-composer-dependencies … … 231 212 232 213 - name: Checkout the WordPress Test Reporter 233 if: ${{ github.repository == 'WordPress/wordpress-develop' && github.ref == 'refs/heads/ master' && matrix.report }}234 uses: actions/checkout@ 5a4ac9002d0be2fb38bd78e4b4dbde5606d7042f # v2.3.4214 if: ${{ github.repository == 'WordPress/wordpress-develop' && github.ref == 'refs/heads/trunk' && matrix.report }} 215 uses: actions/checkout@2541b1294d2704b0964813337f33b291d3f8596b # v3.0.2 235 216 with: 236 217 repository: 'WordPress/phpunit-test-runner' … … 238 219 239 220 - name: Submit test results to the WordPress.org host test results 240 if: ${{ github.repository == 'WordPress/wordpress-develop' && github.ref == 'refs/heads/ master' && matrix.report }}221 if: ${{ github.repository == 'WordPress/wordpress-develop' && github.ref == 'refs/heads/trunk' && matrix.report }} 241 222 env: 242 223 WPT_REPORT_API_KEY: "${{ secrets.WPT_REPORT_API_KEY }}" 243 224 run: docker-compose run --rm -e WPT_REPORT_API_KEY -e WPT_PREPARE_DIR=/var/www -e WPT_TEST_DIR=/var/www php php test-runner/report.php 225 226 slack-notifications: 227 name: Slack Notifications 228 uses: WordPress/wordpress-develop/.github/workflows/slack-notifications.yml@trunk 229 needs: [ test-php ] 230 if: ${{ github.repository == 'WordPress/wordpress-develop' && github.event_name != 'pull_request' && always() }} 231 with: 232 calling_status: ${{ needs.test-php.result == 'success' && 'success' || needs.test-php.result == 'cancelled' && 'cancelled' || 'failure' }} 233 secrets: 234 SLACK_GHA_SUCCESS_WEBHOOK: ${{ secrets.SLACK_GHA_SUCCESS_WEBHOOK }} 235 SLACK_GHA_CANCELLED_WEBHOOK: ${{ secrets.SLACK_GHA_CANCELLED_WEBHOOK }} 236 SLACK_GHA_FIXED_WEBHOOK: ${{ secrets.SLACK_GHA_FIXED_WEBHOOK }} 237 SLACK_GHA_FAILURE_WEBHOOK: ${{ secrets.SLACK_GHA_FAILURE_WEBHOOK }}
Note: See TracChangeset
for help on using the changeset viewer.