From ac8ccb702c0c28112abc9ebf48a38a10686f7b2a Mon Sep 17 00:00:00 2001 From: Igor Zinovyev Date: Wed, 27 Nov 2024 15:00:56 +0300 Subject: [PATCH] Switching to Ubuntu 24.04 LTS for builders and testers. --- .github/workflows/build-docker.yml | 6 +++--- .github/workflows/build.yml | 18 +++++++++--------- .github/workflows/e2e-tests.yml | 28 +++++++++++++--------------- .github/workflows/tests.yml | 14 +++++++------- 4 files changed, 32 insertions(+), 34 deletions(-) diff --git a/.github/workflows/build-docker.yml b/.github/workflows/build-docker.yml index 9ed172916a650..865d0f79236a2 100644 --- a/.github/workflows/build-docker.yml +++ b/.github/workflows/build-docker.yml @@ -1,7 +1,7 @@ name: Build Docker on: push: - branches: [ 'trunk' ] + branches: ['trunk'] paths: - 'tools/docker/Dockerfile' - 'tools/docker/bin/run.sh' @@ -22,11 +22,11 @@ concurrency: jobs: build: name: Build and publish Jetpack Dev Environment - runs-on: ubuntu-latest + runs-on: ubuntu-24.04 permissions: packages: write contents: read - timeout-minutes: 60 # 2021-10-26: Build for arm64 is S-L-O-W. Sigh. + timeout-minutes: 60 # 2021-10-26: Build for arm64 is S-L-O-W. Sigh. steps: - uses: actions/checkout@v4 diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index a5aa9720a9561..2ade410caf752 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -13,18 +13,18 @@ concurrency: cancel-in-progress: true env: - COMPOSER_ROOT_VERSION: "dev-trunk" + COMPOSER_ROOT_VERSION: 'dev-trunk' jobs: build: name: Build all projects - runs-on: ubuntu-latest - timeout-minutes: 30 # 2023-05-25: Build times have crept up to ~15–25+ minutes as we've added more projects, bump to 30. + runs-on: ubuntu-24.04 + timeout-minutes: 30 # 2023-05-25: Build times have crept up to ~15–25+ minutes as we've added more projects, bump to 30. env: # Hard-code a specific directory to avoid paths in vendor/composer/installed.json changing every build. BUILD_BASE: /tmp/jetpack-build # This string is used as a unique identifier of test reminder comments on PRs. - TEST_COMMENT_INDICATOR: "" + TEST_COMMENT_INDICATOR: '' outputs: any_plugins: ${{ steps.plugins.outputs.any }} changed_projects: ${{ steps.changed.outputs.projects }} @@ -199,7 +199,7 @@ jobs: runs-on: ubuntu-latest needs: build if: needs.build.outputs.any_plugins == 'true' - timeout-minutes: 10 # 2021-06-24: Successful runs should take just a few seconds now. But sometimes the upload is slow. + timeout-minutes: 10 # 2021-06-24: Successful runs should take just a few seconds now. But sometimes the upload is slow. steps: - uses: actions/checkout@v4 with: @@ -294,16 +294,16 @@ jobs: - uses: actions/checkout@v4 with: path: monorepo - timeout-minutes: 1 # 2021-01-18: Successful runs seem to take a few seconds + timeout-minutes: 1 # 2021-01-18: Successful runs seem to take a few seconds - name: Download build artifact uses: actions/download-artifact@v4 with: name: jetpack-build - timeout-minutes: 2 # 2022-03-15: Successful runs normally take a few seconds, but on occasion they've been taking 60+ recently. + timeout-minutes: 2 # 2022-03-15: Successful runs normally take a few seconds, but on occasion they've been taking 60+ recently. - name: Extract build archive run: tar --xz -xvvf build.tar.xz build - timeout-minutes: 1 # 2021-01-18: Successful runs seem to take a few seconds + timeout-minutes: 1 # 2021-01-18: Successful runs seem to take a few seconds - name: Wait for prior instances of the workflow to finish uses: ./monorepo/.github/actions/turnstile @@ -316,4 +316,4 @@ jobs: upstream-ref-since: '2024-04-10' # No point in checking 12 years of earlier commits from before we started adding "Upstream-Ref". username: matticbot working-directory: ${{ github.workspace }}/build - timeout-minutes: 10 # 2024-04-11: Successful runs seem to take about a minute. + timeout-minutes: 10 # 2024-04-11: Successful runs seem to take about a minute. diff --git a/.github/workflows/e2e-tests.yml b/.github/workflows/e2e-tests.yml index 98e01159a7ad4..580b0b264a680 100644 --- a/.github/workflows/e2e-tests.yml +++ b/.github/workflows/e2e-tests.yml @@ -5,7 +5,7 @@ on: paths-ignore: - '**.md' repository_dispatch: - types: [ 'e2e tests**' ] + types: ['e2e tests**'] concurrency: group: e2e-tests-${{ github.event_name }}-${{ github.ref }}-${{ github.event.action }} @@ -13,9 +13,9 @@ concurrency: jobs: create-test-matrix: - name: "Determine tests matrix" - runs-on: ubuntu-latest - timeout-minutes: 5 # 2023-09-15: The pnpm install may take a few minutes on cache miss. + name: 'Determine tests matrix' + runs-on: ubuntu-24.04 + timeout-minutes: 5 # 2023-09-15: The pnpm install may take a few minutes on cache miss. # Only run tests in the main repository if: github.event.pull_request.head.repo.full_name == github.event.pull_request.base.repo.full_name outputs: @@ -62,7 +62,7 @@ jobs: echo "build-matrix=$BUILD_MATRIX" >> "$GITHUB_OUTPUT" build-projects: - name: "E2E: Build ${{ matrix.buildGroup }}" + name: 'E2E: Build ${{ matrix.buildGroup }}' runs-on: ubuntu-latest needs: create-test-matrix timeout-minutes: 30 @@ -98,7 +98,7 @@ jobs: id: build-step if: steps.jetpack-build-cache.outputs.cache-hit != 'true' env: - COMPOSER_ROOT_VERSION: "dev-trunk" + COMPOSER_ROOT_VERSION: 'dev-trunk' BUILD_DIR: ./build-output PROJECT_PATH: ${{ matrix.path }} run: | @@ -133,9 +133,9 @@ jobs: key: ${{ steps.jetpack-build-cache.outputs.cache-primary-key }} e2e-tests: - name: "${{ matrix.project }} e2e tests" + name: '${{ matrix.project }} e2e tests' runs-on: ubuntu-latest - needs: [ create-test-matrix, build-projects ] + needs: [create-test-matrix, build-projects] # The "always() && ! cancelled() && ! failure()" bit is needed to still run if the build was skipped. if: > always() && ! cancelled() && ! failure() && @@ -185,7 +185,7 @@ jobs: - name: Prepare build env: - COMPOSER_ROOT_VERSION: "dev-trunk" + COMPOSER_ROOT_VERSION: 'dev-trunk' BUILD_DIR: ./build-output PROJECT_PATH: ${{ matrix.path }} SUITE: ${{ matrix.suite }} @@ -303,7 +303,7 @@ jobs: include-hidden-files: true test-report: - name: "Test report" + name: 'Test report' runs-on: ubuntu-latest if: ${{ success() || failure() }} needs: [e2e-tests] @@ -340,7 +340,7 @@ jobs: client-payload: ${{ steps.report-context.outputs.client_payload }} slack-notification: - name: "Slack notification" + name: 'Slack notification' runs-on: ubuntu-latest if: ${{ success() || failure() }} needs: [e2e-tests] @@ -376,16 +376,14 @@ jobs: VERSION: ${{ github.event.client_payload.ref_name }} run: echo "NOTIFICATION_SUITE=rc-${VERSION}" >> $GITHUB_ENV - - name: "Send notification" + - name: 'Send notification' uses: ./projects/github-actions/test-results-to-slack with: github_token: ${{ secrets.GITHUB_TOKEN }} slack_token: ${{ secrets.SLACK_TOKEN }} slack_channel: ${{ secrets.SLACK_E2E_CHANNEL }} - slack_icon_emoji: ":jetpack:" + slack_icon_emoji: ':jetpack:' suite_name: ${{ env.NOTIFICATION_SUITE }} playwright_report_path: test-output/**/summary.json playwright_output_dir: test-output/**/results rules_configuration_path: .github/files/e2e-tests/notification-rules.json - - diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index a18c812be4b0d..16c431293e642 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -3,19 +3,19 @@ name: Tests on: pull_request: push: - branches: [ 'trunk', '*/branch-*' ] + branches: ['trunk', '*/branch-*'] concurrency: group: tests-${{ github.event_name }}-${{ github.ref }} cancel-in-progress: true env: - COMPOSER_ROOT_VERSION: "dev-trunk" + COMPOSER_ROOT_VERSION: 'dev-trunk' jobs: create-matrix: - name: "Determine tests matrix" - runs-on: ubuntu-latest - timeout-minutes: 1 # 2021-02-03: Should only take a second. + name: 'Determine tests matrix' + runs-on: ubuntu-24.04 + timeout-minutes: 1 # 2021-02-03: Should only take a second. outputs: matrix: ${{ steps.create-matrix.outputs.matrix }} steps: @@ -330,7 +330,7 @@ jobs: plugin-deps: name: Check plugin monorepo dep versions runs-on: ubuntu-latest - timeout-minutes: 2 # 2022-09-08: Should only take a few seconds. + timeout-minutes: 2 # 2022-09-08: Should only take a few seconds. steps: - uses: actions/checkout@v4 - name: Setup tools @@ -369,7 +369,7 @@ jobs: phan: name: Static analysis runs-on: ubuntu-latest - timeout-minutes: 20 # 2024-05-02: Up to about 8 minutes now that we're running against the old WP stubs too. + timeout-minutes: 20 # 2024-05-02: Up to about 8 minutes now that we're running against the old WP stubs too. steps: - uses: actions/checkout@v4 - name: Setup tools