From e50b12e79e709d195707217d7971b998db0fb721 Mon Sep 17 00:00:00 2001 From: Sam Rose Date: Wed, 20 Nov 2024 15:51:21 +0000 Subject: [PATCH 1/7] Fix test-libraries yarn invocation. --- .github/workflows/budibase_ci.yml | 6 ++++-- packages/builder/src/helpers/tests/nameHelpers.spec.js | 2 +- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/.github/workflows/budibase_ci.yml b/.github/workflows/budibase_ci.yml index f1ed6eb87e..af286a1237 100644 --- a/.github/workflows/budibase_ci.yml +++ b/.github/workflows/budibase_ci.yml @@ -114,9 +114,11 @@ jobs: - name: Test run: | if ${{ env.ONLY_AFFECTED_TASKS }}; then - yarn test -- --ignore=@budibase/worker --ignore=@budibase/server --no-prefix --since=${{ env.NX_BASE_BRANCH }} -- --verbose --reporters=default --reporters=github-actions + yarn test -- --ignore=@budibase/worker --ignore=@budibase/server --ignore=@budibase/builder --no-prefix --since=${{ env.NX_BASE_BRANCH }} -- --verbose --reporters=default --reporters=github-actions + yarn test -- --scope=@budibase/builder --since=${{ env.NX_BASE_BRANCH }} else - yarn test -- --ignore=@budibase/worker --ignore=@budibase/server --no-prefix -- --verbose --reporters=default --reporters=github-actions + yarn test -- --ignore=@budibase/worker --ignore=@budibase/server --ignore=@budibase/builder --no-prefix -- --verbose --reporters=default --reporters=github-actions + yarn test -- --scope=@budibase/builder fi test-worker: diff --git a/packages/builder/src/helpers/tests/nameHelpers.spec.js b/packages/builder/src/helpers/tests/nameHelpers.spec.js index 1ce2d1987a..167d9c29ae 100644 --- a/packages/builder/src/helpers/tests/nameHelpers.spec.js +++ b/packages/builder/src/helpers/tests/nameHelpers.spec.js @@ -90,7 +90,7 @@ describe("Automation Binding Update Functions", () => { 1 ) - expect(result[1].name).toBe("Second Step") + expect(result[1].name).toBe("Second Step fail") expect(result[2].inputs.branches[0].condition.equal).toEqual({ "stepsByName.Renamed Step.success": true, From d2241b0ffae1236135a2d9163902f03ce693bcfa Mon Sep 17 00:00:00 2001 From: Sam Rose Date: Wed, 20 Nov 2024 15:53:26 +0000 Subject: [PATCH 2/7] Enable github annotations for vitest. --- .github/workflows/budibase_ci.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/budibase_ci.yml b/.github/workflows/budibase_ci.yml index af286a1237..e02caa816a 100644 --- a/.github/workflows/budibase_ci.yml +++ b/.github/workflows/budibase_ci.yml @@ -112,6 +112,9 @@ jobs: - run: yarn --frozen-lockfile - name: Test + env: + # This enables github annotations for vitest + GITHUB_ACTIONS: true run: | if ${{ env.ONLY_AFFECTED_TASKS }}; then yarn test -- --ignore=@budibase/worker --ignore=@budibase/server --ignore=@budibase/builder --no-prefix --since=${{ env.NX_BASE_BRANCH }} -- --verbose --reporters=default --reporters=github-actions From edee1c2a740a8ac250353ebcf640c2f509061d1e Mon Sep 17 00:00:00 2001 From: Sam Rose Date: Wed, 20 Nov 2024 15:56:17 +0000 Subject: [PATCH 3/7] Forgot the no-prefix flag. --- .github/workflows/budibase_ci.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/budibase_ci.yml b/.github/workflows/budibase_ci.yml index e02caa816a..83b6720e62 100644 --- a/.github/workflows/budibase_ci.yml +++ b/.github/workflows/budibase_ci.yml @@ -118,10 +118,10 @@ jobs: run: | if ${{ env.ONLY_AFFECTED_TASKS }}; then yarn test -- --ignore=@budibase/worker --ignore=@budibase/server --ignore=@budibase/builder --no-prefix --since=${{ env.NX_BASE_BRANCH }} -- --verbose --reporters=default --reporters=github-actions - yarn test -- --scope=@budibase/builder --since=${{ env.NX_BASE_BRANCH }} + yarn test -- --scope=@budibase/builder --since=${{ env.NX_BASE_BRANCH }} --no-prefix else yarn test -- --ignore=@budibase/worker --ignore=@budibase/server --ignore=@budibase/builder --no-prefix -- --verbose --reporters=default --reporters=github-actions - yarn test -- --scope=@budibase/builder + yarn test -- --scope=@budibase/builder --no-prefix fi test-worker: From 900dfc165288b4b0e34d6b08dbbaa7afb6bc132a Mon Sep 17 00:00:00 2001 From: Sam Rose Date: Wed, 20 Nov 2024 16:03:45 +0000 Subject: [PATCH 4/7] Try a different method for enabling GHA annotations in vitest. --- .github/workflows/budibase_ci.yml | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/.github/workflows/budibase_ci.yml b/.github/workflows/budibase_ci.yml index 83b6720e62..413f62cb37 100644 --- a/.github/workflows/budibase_ci.yml +++ b/.github/workflows/budibase_ci.yml @@ -113,15 +113,13 @@ jobs: - run: yarn --frozen-lockfile - name: Test env: - # This enables github annotations for vitest - GITHUB_ACTIONS: true run: | if ${{ env.ONLY_AFFECTED_TASKS }}; then yarn test -- --ignore=@budibase/worker --ignore=@budibase/server --ignore=@budibase/builder --no-prefix --since=${{ env.NX_BASE_BRANCH }} -- --verbose --reporters=default --reporters=github-actions - yarn test -- --scope=@budibase/builder --since=${{ env.NX_BASE_BRANCH }} --no-prefix + yarn test -- --scope=@budibase/builder --since=${{ env.NX_BASE_BRANCH }} --no-prefix -- --reporter=default --reporter=github-actions else yarn test -- --ignore=@budibase/worker --ignore=@budibase/server --ignore=@budibase/builder --no-prefix -- --verbose --reporters=default --reporters=github-actions - yarn test -- --scope=@budibase/builder --no-prefix + yarn test -- --scope=@budibase/builder --no-prefix -- --reporter=default --reporter=github-actions fi test-worker: From a97d56149b14f392b2d729ef6b9c236c98f541a3 Mon Sep 17 00:00:00 2001 From: Sam Rose Date: Wed, 20 Nov 2024 16:04:41 +0000 Subject: [PATCH 5/7] Rename empty env. --- .github/workflows/budibase_ci.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/budibase_ci.yml b/.github/workflows/budibase_ci.yml index 413f62cb37..d30ef8f2fa 100644 --- a/.github/workflows/budibase_ci.yml +++ b/.github/workflows/budibase_ci.yml @@ -112,7 +112,6 @@ jobs: - run: yarn --frozen-lockfile - name: Test - env: run: | if ${{ env.ONLY_AFFECTED_TASKS }}; then yarn test -- --ignore=@budibase/worker --ignore=@budibase/server --ignore=@budibase/builder --no-prefix --since=${{ env.NX_BASE_BRANCH }} -- --verbose --reporters=default --reporters=github-actions From a7b51c8d08ae95afc8db29001c7d0ea7949ad994 Mon Sep 17 00:00:00 2001 From: Sam Rose Date: Wed, 20 Nov 2024 16:09:09 +0000 Subject: [PATCH 6/7] Give up on annotations for packages/builder for now. --- .github/workflows/budibase_ci.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/budibase_ci.yml b/.github/workflows/budibase_ci.yml index d30ef8f2fa..1258bddcca 100644 --- a/.github/workflows/budibase_ci.yml +++ b/.github/workflows/budibase_ci.yml @@ -115,10 +115,10 @@ jobs: run: | if ${{ env.ONLY_AFFECTED_TASKS }}; then yarn test -- --ignore=@budibase/worker --ignore=@budibase/server --ignore=@budibase/builder --no-prefix --since=${{ env.NX_BASE_BRANCH }} -- --verbose --reporters=default --reporters=github-actions - yarn test -- --scope=@budibase/builder --since=${{ env.NX_BASE_BRANCH }} --no-prefix -- --reporter=default --reporter=github-actions + yarn test -- --scope=@budibase/builder --since=${{ env.NX_BASE_BRANCH }} else yarn test -- --ignore=@budibase/worker --ignore=@budibase/server --ignore=@budibase/builder --no-prefix -- --verbose --reporters=default --reporters=github-actions - yarn test -- --scope=@budibase/builder --no-prefix -- --reporter=default --reporter=github-actions + yarn test -- --scope=@budibase/builder --no-prefix fi test-worker: From b2e18ba9086ee45bf5ced187aff9950a40eba77c Mon Sep 17 00:00:00 2001 From: Sam Rose Date: Wed, 20 Nov 2024 16:09:22 +0000 Subject: [PATCH 7/7] Fix test. --- packages/builder/src/helpers/tests/nameHelpers.spec.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/builder/src/helpers/tests/nameHelpers.spec.js b/packages/builder/src/helpers/tests/nameHelpers.spec.js index 167d9c29ae..1ce2d1987a 100644 --- a/packages/builder/src/helpers/tests/nameHelpers.spec.js +++ b/packages/builder/src/helpers/tests/nameHelpers.spec.js @@ -90,7 +90,7 @@ describe("Automation Binding Update Functions", () => { 1 ) - expect(result[1].name).toBe("Second Step fail") + expect(result[1].name).toBe("Second Step") expect(result[2].inputs.branches[0].condition.equal).toEqual({ "stepsByName.Renamed Step.success": true,