From c617ec0341bd6df6e39d05dee8594f527921b34b Mon Sep 17 00:00:00 2001 From: Jonathan Desrosiers Date: Fri, 23 Sep 2022 20:03:00 +0000 Subject: [PATCH] Build/Test Tools: Test building WordPress to run from `src` first. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Because of the scripts that run when `build:dev` is run, it’s more common for this Grunt task to change version-controlled files than when building WordPress to run from `build`. This moves the `build:dev` tests before the `build` ones in order to detect changes earlier in the workflow. See #55652. git-svn-id: https://develop.svn.wordpress.org/trunk@54297 602fd350-edb4-49c9-b593-d223f7449a82 --- .github/workflows/test-npm.yml | 36 +++++++++++++++++----------------- 1 file changed, 18 insertions(+), 18 deletions(-) diff --git a/.github/workflows/test-npm.yml b/.github/workflows/test-npm.yml index c377a121f8..4861ec9c9c 100644 --- a/.github/workflows/test-npm.yml +++ b/.github/workflows/test-npm.yml @@ -81,15 +81,6 @@ jobs: - name: Install Dependencies run: npm ci - - name: Build WordPress - run: npm run build - - - name: Clean after building - run: npm run grunt clean - - - name: Ensure version-controlled files are not modified or deleted during building and cleaning - run: git diff --exit-code - - name: Build WordPress in /src run: npm run build:dev @@ -99,6 +90,15 @@ jobs: - name: Ensure version-controlled files are not modified or deleted during building and cleaning run: git diff --exit-code + - name: Build WordPress + run: npm run build + + - name: Clean after building + run: npm run grunt clean + + - name: Ensure version-controlled files are not modified or deleted during building and cleaning + run: git diff --exit-code + # Verifies that installing NPM dependencies and building WordPress works as expected on MacOS. # # This is separate from the job above in order to use stricter conditions about when to run. @@ -141,15 +141,6 @@ jobs: - name: Install Dependencies run: npm ci - - name: Build WordPress - run: npm run build - - - name: Clean after building - run: npm run grunt clean - - - name: Ensure version-controlled files are not modified or deleted during building and cleaning - run: git diff --exit-code - - name: Build WordPress in /src run: npm run build:dev @@ -159,6 +150,15 @@ jobs: - name: Ensure version-controlled files are not modified or deleted during building and cleaning run: git diff --exit-code + - name: Build WordPress + run: npm run build + + - name: Clean after building + run: npm run grunt clean + + - name: Ensure version-controlled files are not modified or deleted during building and cleaning + run: git diff --exit-code + slack-notifications: name: Slack Notifications uses: WordPress/wordpress-develop/.github/workflows/slack-notifications.yml@trunk