Changeset 53598 for branches/5.7/.github/workflows/end-to-end-tests.yml
- Timestamp:
- 06/30/2022 04:34:14 PM (4 years ago)
- Location:
- branches/5.7
- Files:
-
- 2 edited
-
. (modified) (1 prop)
-
.github/workflows/end-to-end-tests.yml (modified) (7 diffs)
Legend:
- Unmodified
- Added
- Removed
-
branches/5.7
-
branches/5.7/.github/workflows/end-to-end-tests.yml
r50591 r53598 2 2 3 3 on: 4 # The end toend test suite was introduced in WordPress 5.3.4 # The end-to-end test suite was introduced in WordPress 5.3. 5 5 push: 6 6 branches: 7 - master8 7 - trunk 9 8 - '5.[3-9]' … … 14 13 pull_request: 15 14 branches: 16 - master17 15 - trunk 18 16 - '5.[3-9]' 19 17 - '[6-9].[0-9]' 20 18 workflow_dispatch: 19 20 # Cancels all previous workflow runs for pull requests that have not completed. 21 concurrency: 22 # The concurrency group contains the workflow name and the branch name for pull requests 23 # or the commit hash for any other events. 24 group: ${{ github.workflow }}-${{ github.event_name == 'pull_request' && github.head_ref || github.sha }} 25 cancel-in-progress: true 21 26 22 27 env: … … 27 32 # 28 33 # Performs the following steps: 29 # - Cancels all previous workflow runs for pull requests that have not completed. 30 # - Set environment variables. 34 # - Sets environment variables. 31 35 # - Checks out the repository. 32 # - Logs debug information about the runner container. 33 # - Installs NodeJS 14. 34 # - Sets up caching for NPM. 35 # _ Installs NPM dependencies using install-changed to hash the `package.json` file. 36 # - Logs debug information about the GitHub Action runner. 37 # - Installs NodeJS. 38 # _ Installs NPM dependencies. 36 39 # - Builds WordPress to run from the `build` directory. 37 40 # - Starts the WordPress Docker container. … … 41 44 # - Install WordPress within the Docker container. 42 45 # - Run the E2E tests. 43 # - todo: Configure Slack notifications for failing tests.44 46 e2e-tests: 45 47 name: E2E Tests 46 48 runs-on: ubuntu-latest 49 timeout-minutes: 20 47 50 if: ${{ github.repository == 'WordPress/wordpress-develop' || github.event_name == 'pull_request' }} 48 51 49 52 steps: 50 - name: Cancel previous runs of this workflow (pull requests only)51 if: ${{ github.event_name == 'pull_request' }}52 uses: styfle/cancel-workflow-action@3d86a7cc43670094ac248017207be0295edbc31d # v0.8.053 54 53 - name: Configure environment variables 55 54 run: | … … 58 57 59 58 - name: Checkout repository 60 uses: actions/checkout@ 5a4ac9002d0be2fb38bd78e4b4dbde5606d7042f # v2.3.459 uses: actions/checkout@2541b1294d2704b0964813337f33b291d3f8596b # v3.0.2 61 60 62 61 - name: Log debug information … … 72 71 73 72 - name: Install NodeJS 74 uses: actions/setup-node@ 46071b5c7a2e0c34e49c3cb8a0e792e86e18d5ea # v2.1.573 uses: actions/setup-node@eeb10cff27034e7acf239c5d29f62154018672fd # v3.3.0 75 74 with: 76 node-version: 14 77 78 - name: Cache NodeJS modules 79 uses: actions/cache@26968a09c0ea4f3e233fdddbafd1166051a095f6 # v2.1.4 80 env: 81 cache-name: cache-node-modules 82 with: 83 # npm cache files are stored in `~/.npm` on Linux/macOS 84 path: ~/.npm 85 key: ${{ runner.os }}-npm-${{ hashFiles('**/package-lock.json') }} 75 node-version-file: '.nvmrc' 76 cache: npm 86 77 87 78 - name: Install Dependencies … … 121 112 - name: Run E2E tests 122 113 run: npm run test:e2e 114 115 slack-notifications: 116 name: Slack Notifications 117 uses: WordPress/wordpress-develop/.github/workflows/slack-notifications.yml@trunk 118 needs: [ e2e-tests ] 119 if: ${{ github.repository == 'WordPress/wordpress-develop' && github.event_name != 'pull_request' && always() }} 120 with: 121 calling_status: ${{ needs.e2e-tests.result == 'success' && 'success' || needs.e2e-tests.result == 'cancelled' && 'cancelled' || 'failure' }} 122 secrets: 123 SLACK_GHA_SUCCESS_WEBHOOK: ${{ secrets.SLACK_GHA_SUCCESS_WEBHOOK }} 124 SLACK_GHA_CANCELLED_WEBHOOK: ${{ secrets.SLACK_GHA_CANCELLED_WEBHOOK }} 125 SLACK_GHA_FIXED_WEBHOOK: ${{ secrets.SLACK_GHA_FIXED_WEBHOOK }} 126 SLACK_GHA_FAILURE_WEBHOOK: ${{ secrets.SLACK_GHA_FAILURE_WEBHOOK }}
Note: See TracChangeset
for help on using the changeset viewer.