From f538b55110a010bb8205bdbe249a4ee23d4bc7d3 Mon Sep 17 00:00:00 2001 From: Adria Navarro Date: Tue, 26 Sep 2023 18:06:52 +0200 Subject: [PATCH 1/3] Split test worker and server --- .github/workflows/budibase_ci.yml | 50 ++++++++++++++++++++++++++----- 1 file changed, 43 insertions(+), 7 deletions(-) diff --git a/.github/workflows/budibase_ci.yml b/.github/workflows/budibase_ci.yml index fc35575ec6..9d1131ed7f 100644 --- a/.github/workflows/budibase_ci.yml +++ b/.github/workflows/budibase_ci.yml @@ -30,8 +30,8 @@ jobs: with: root-reserve-mb: 35000 swap-size-mb: 1024 - remove-android: 'true' - remove-dotnet: 'true' + remove-android: "true" + remove-dotnet: "true" - name: Checkout repo and submodules uses: actions/checkout@v3 if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name == 'Budibase/budibase' @@ -121,7 +121,7 @@ jobs: name: codecov-umbrella verbose: true - test-services: + test-worker: runs-on: ubuntu-latest steps: - name: Checkout repo and submodules @@ -143,12 +143,48 @@ jobs: node-version: 18.x cache: "yarn" - run: yarn --frozen-lockfile - - name: Test worker and server + - name: Test worker run: | if ${{ env.USE_NX_AFFECTED }}; then - yarn test --scope=@budibase/worker --scope=@budibase/server --since=${{ env.NX_BASE_BRANCH }} + yarn test --scope=@budibase/worker --since=${{ env.NX_BASE_BRANCH }} else - yarn test --scope=@budibase/worker --scope=@budibase/server + yarn test --scope=@budibase/worker + fi + + - uses: codecov/codecov-action@v3 + with: + token: ${{ secrets.CODECOV_TOKEN || github.token }} # not required for public repos + name: codecov-umbrella + verbose: true + + test-server: + runs-on: ubuntu-latest + steps: + - name: Checkout repo and submodules + uses: actions/checkout@v3 + if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name == 'Budibase/budibase' + with: + submodules: true + token: ${{ secrets.PERSONAL_ACCESS_TOKEN || github.token }} + fetch-depth: 0 + - name: Checkout repo only + uses: actions/checkout@v3 + if: github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name != 'Budibase/budibase' + with: + fetch-depth: 0 + + - name: Use Node.js 18.x + uses: actions/setup-node@v3 + with: + node-version: 18.x + cache: "yarn" + - run: yarn --frozen-lockfile + - name: Test server + run: | + if ${{ env.USE_NX_AFFECTED }}; then + yarn test --scope=@budibase/server --since=${{ env.NX_BASE_BRANCH }} + else + yarn test --scope=@budibase/server fi - uses: codecov/codecov-action@v3 @@ -259,4 +295,4 @@ jobs: process.exit(1); } else { console.log('All good, the submodule had been merged and setup correctly!') - } \ No newline at end of file + } From f600ad7711d992fe9ffd8836039273148e049522 Mon Sep 17 00:00:00 2001 From: Adria Navarro Date: Tue, 26 Sep 2023 18:08:37 +0200 Subject: [PATCH 2/3] Editing scripts --- packages/server/scripts/test.sh | 3 +-- packages/worker/scripts/test.sh | 6 +++--- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/packages/server/scripts/test.sh b/packages/server/scripts/test.sh index 990d534d8c..eb1cf67b01 100644 --- a/packages/server/scripts/test.sh +++ b/packages/server/scripts/test.sh @@ -3,9 +3,8 @@ set -e if [[ -n $CI ]] then - # --runInBand performs better in ci where resources are limited + # Running in ci, where resources are limited export NODE_OPTIONS="--max-old-space-size=4096" - node ../../node_modules/jest/bin/jest.js --version echo "jest --coverage --maxWorkers=2 --forceExit --workerIdleMemoryLimit=2000MB --bail" jest --coverage --maxWorkers=2 --forceExit --workerIdleMemoryLimit=2000MB --bail else diff --git a/packages/worker/scripts/test.sh b/packages/worker/scripts/test.sh index e9755f6afe..eba95c4916 100644 --- a/packages/worker/scripts/test.sh +++ b/packages/worker/scripts/test.sh @@ -3,9 +3,9 @@ set -e if [[ -n $CI ]] then - # --runInBand performs better in ci where resources are limited - echo "jest --coverage --runInBand --forceExit --bail" - jest --coverage --runInBand --forceExit --bail + # Running in ci, where resources are limited + echo "jest --coverage --maxWorkers=2 --forceExit --bail" + jest --coverage --maxWorkers=2 --forceExit --bail else # --maxWorkers performs better in development echo "jest --coverage --maxWorkers=2 --forceExit" From 60c1922a37b2f953beeb034642feaab191ef6026 Mon Sep 17 00:00:00 2001 From: Budibase Staging Release Bot <> Date: Tue, 26 Sep 2023 16:29:13 +0000 Subject: [PATCH 3/3] Bump version to 2.10.12-alpha.23 --- lerna.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lerna.json b/lerna.json index 28eadb46bc..c4d2219e21 100644 --- a/lerna.json +++ b/lerna.json @@ -1,5 +1,5 @@ { - "version": "2.10.12-alpha.22", + "version": "2.10.12-alpha.23", "npmClient": "yarn", "packages": [ "packages/*"