Changeset 58357 for branches/6.0/.github/workflows/end-to-end-tests.yml
- Timestamp:
- 06/06/2024 03:27:31 PM (8 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/6.0/.github/workflows/end-to-end-tests.yml
r57202 r58357 9 9 - '[6-9].[0-9]' 10 10 tags: 11 - '5.[3-9]*' 12 - '[6-9].[0-9]*' 11 - '[0-9]+.[0-9]' 12 - '[0-9]+.[0-9].[0-9]+' 13 - '![34].[0-9].[0-9]+' 14 - '!5.[0-2].[0-9]+' 13 15 pull_request: 14 16 branches: … … 25 27 cancel-in-progress: true 26 28 29 # Disable permissions for all available scopes by default. 30 # Any needed permissions should be configured at the job level. 31 permissions: {} 32 27 33 env: 28 34 LOCAL_DIR: build 29 LOCAL_PHP: 8.0-fpm30 35 31 36 jobs: 32 37 # Runs the end-to-end test suite. 33 #34 # Performs the following steps:35 # - Sets environment variables.36 # - Checks out the repository.37 # - Sets up Node.js.38 # - Logs debug information about the GitHub Action runner.39 # - Installs npm dependencies.40 # - Builds WordPress to run from the `build` directory.41 # - Starts the WordPress Docker container.42 # - Logs the running Docker containers.43 # - Logs Docker debug information (about both the Docker installation within the runner and the WordPress container).44 # - Install WordPress within the Docker container.45 # - Run the E2E tests.46 # - Ensures version-controlled files are not modified or deleted.47 38 e2e-tests: 48 name: E2E Tests 49 runs-on: ubuntu-latest 50 timeout-minutes: 20 39 name: Test with SCRIPT_DEBUG ${{ matrix.LOCAL_SCRIPT_DEBUG && 'enabled' || 'disabled' }} 40 uses: WordPress/wordpress-develop/.github/workflows/reusable-end-to-end-tests.yml@trunk 41 permissions: 42 contents: read 51 43 if: ${{ github.repository == 'WordPress/wordpress-develop' || github.event_name == 'pull_request' }} 52 53 steps: 54 - name: Configure environment variables 55 run: | 56 echo "PHP_FPM_UID=$(id -u)" >> $GITHUB_ENV 57 echo "PHP_FPM_GID=$(id -g)" >> $GITHUB_ENV 58 59 - name: Checkout repository 60 uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3.3.0 61 62 - name: Set up Node.js 63 uses: actions/setup-node@64ed1c7eab4cce3362f8c340dee64e5eaeef8f7c # v3.6.0 64 with: 65 node-version-file: '.nvmrc' 66 cache: npm 67 68 - name: Log debug information 69 run: | 70 npm --version 71 node --version 72 curl --version 73 git --version 74 svn --version 75 locale -a 76 77 - name: Install npm Dependencies 78 run: npm ci 79 80 - name: Build WordPress 81 run: npm run build 82 83 - name: Start Docker environment 84 run: | 85 npm run env:start 86 87 - name: Log running Docker containers 88 run: docker ps -a 89 90 - name: Docker debug information 91 run: | 92 docker -v 93 docker-compose -v 94 docker-compose run --rm mysql mysql --version 95 docker-compose run --rm php php --version 96 docker-compose run --rm php php -m 97 docker-compose run --rm php php -i 98 docker-compose run --rm php locale -a 99 100 - name: Install WordPress 101 run: npm run env:install 102 103 - name: Run E2E tests 104 run: npm run test:e2e 105 106 - name: Ensure version-controlled files are not modified or deleted 107 run: git diff --exit-code 108 109 slack-notifications: 110 name: Slack Notifications 111 uses: WordPress/wordpress-develop/.github/workflows/slack-notifications.yml@trunk 112 needs: [ e2e-tests ] 113 if: ${{ github.repository == 'WordPress/wordpress-develop' && github.event_name != 'pull_request' && always() }} 44 strategy: 45 fail-fast: false 46 matrix: 47 LOCAL_SCRIPT_DEBUG: [ true, false ] 114 48 with: 115 calling_status: ${{ needs.e2e-tests.result == 'success' && 'success' || needs.e2e-tests.result == 'cancelled' && 'cancelled' || 'failure' }} 116 secrets: 117 SLACK_GHA_SUCCESS_WEBHOOK: ${{ secrets.SLACK_GHA_SUCCESS_WEBHOOK }} 118 SLACK_GHA_CANCELLED_WEBHOOK: ${{ secrets.SLACK_GHA_CANCELLED_WEBHOOK }} 119 SLACK_GHA_FIXED_WEBHOOK: ${{ secrets.SLACK_GHA_FIXED_WEBHOOK }} 120 SLACK_GHA_FAILURE_WEBHOOK: ${{ secrets.SLACK_GHA_FAILURE_WEBHOOK }} 49 LOCAL_SCRIPT_DEBUG: ${{ matrix.LOCAL_SCRIPT_DEBUG }} 50 php-version: '8.0' 51 install-gutenberg: false 121 52 122 53 failed-workflow: 123 54 name: Failed workflow tasks 124 55 runs-on: ubuntu-latest 125 needs: [ e2e-tests, slack-notifications ] 56 permissions: 57 actions: write 58 needs: [ e2e-tests ] 126 59 if: | 127 60 always() && … … 132 65 needs.e2e-tests.result == 'cancelled' || needs.e2e-tests.result == 'failure' 133 66 ) 134 135 67 steps: 136 68 - name: Dispatch workflow run 137 uses: actions/github-script@ 98814c53be79b1d30f795b907e553d8679345975 # v6.4.069 uses: actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea # v7.0.1 138 70 with: 139 71 retries: 2
Note: See TracChangeset
for help on using the changeset viewer.