From fdec26724691d64c58e4cfe17557ec5ef00bc0bd Mon Sep 17 00:00:00 2001 From: Pascal Birchler Date: Wed, 29 Nov 2023 11:52:36 +0000 Subject: [PATCH] Test: Run database upgrades between performance test steps. Prevents pending upgrades from blocking tests when checking out previous builds. Props mukesh27. See #59647. git-svn-id: https://develop.svn.wordpress.org/trunk@57143 602fd350-edb4-49c9-b593-d223f7449a82 --- .github/workflows/performance.yml | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/.github/workflows/performance.yml b/.github/workflows/performance.yml index ce7767e57d..a4a1843113 100644 --- a/.github/workflows/performance.yml +++ b/.github/workflows/performance.yml @@ -73,11 +73,13 @@ jobs: # - Check out target commit (target branch or previous commit). # - Install npm dependencies. # - Build WordPress. + # - Run any database upgrades. # - Run performance tests (previous/target commit). # - Print target performance tests results. # - Reset to original commit. # - Install npm dependencies. # - Set the environment to the baseline version. + # - Run any database upgrades. # - Run baseline performance tests. # - Print baseline performance tests results. # - Compare results with base. @@ -194,6 +196,9 @@ jobs: - name: Build WordPress run: npm run build + - name: Run any database upgrades + run: npm run env:cli -- core update-db --path=/var/www/${{ env.LOCAL_DIR }} + - name: Run target performance tests (base/previous commit) env: TEST_RESULTS_PREFIX: before @@ -215,6 +220,9 @@ jobs: npm run env:cli -- core update --version=${{ env.BASE_TAG }} --force --path=/var/www/${{ env.LOCAL_DIR }} npm run env:cli -- core version --path=/var/www/${{ env.LOCAL_DIR }} + - name: Run any database upgrades + run: npm run env:cli -- core update-db --path=/var/www/${{ env.LOCAL_DIR }} + - name: Run baseline performance tests env: TEST_RESULTS_PREFIX: base