diff --git a/.github/workflows/budibase_ci.yml b/.github/workflows/budibase_ci.yml index 55c4405e10..757a9a4983 100644 --- a/.github/workflows/budibase_ci.yml +++ b/.github/workflows/budibase_ci.yml @@ -22,43 +22,44 @@ jobs: lint: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 - name: Use Node.js 14.x - uses: actions/setup-node@v1 + uses: actions/setup-node@v3 with: node-version: 14.x + cache: "yarn" - run: yarn - run: yarn lint build: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 with: submodules: true token: ${{ secrets.PERSONAL_ACCESS_TOKEN }} - name: Use Node.js 14.x - uses: actions/setup-node@v1 + uses: actions/setup-node@v3 with: node-version: 14.x + cache: "yarn" - run: yarn - - run: yarn bootstrap - run: yarn build test: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 with: submodules: true token: ${{ secrets.PERSONAL_ACCESS_TOKEN }} - name: Use Node.js 14.x - uses: actions/setup-node@v1 + uses: actions/setup-node@v3 with: node-version: 14.x + cache: "yarn" - run: yarn - - run: yarn bootstrap - - run: yarn build + - run: yarn build --scope=@budibase/types --scope=@budibase/shared-core --scope=@budibase/string-templates - run: yarn test --ignore=@budibase/pro - uses: codecov/codecov-action@v3 with: @@ -69,32 +70,34 @@ jobs: test-pro: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 with: submodules: true token: ${{ secrets.PERSONAL_ACCESS_TOKEN }} - name: Use Node.js 14.x - uses: actions/setup-node@v1 + uses: actions/setup-node@v3 with: node-version: 14.x + cache: "yarn" - run: yarn - - run: yarn bootstrap - - run: yarn build --scope=@budibase/types --scope=@budibase/shared-core - run: yarn test --scope=@budibase/pro integration-test: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 with: submodules: true token: ${{ secrets.PERSONAL_ACCESS_TOKEN }} - name: Use Node.js 14.x - uses: actions/setup-node@v1 + uses: actions/setup-node@v3 with: node-version: 14.x - - run: yarn && yarn bootstrap && yarn build - - run: | + cache: "yarn" + - run: yarn + - run: yarn build + - name: Run tests + run: | cd qa-core yarn setup yarn test:ci @@ -106,7 +109,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout code - uses: actions/checkout@v2 + uses: actions/checkout@v3 with: submodules: true token: ${{ secrets.PERSONAL_ACCESS_TOKEN }} diff --git a/packages/builder/tsconfig.json b/packages/builder/tsconfig.json index 400f964e30..0913aea33d 100644 --- a/packages/builder/tsconfig.json +++ b/packages/builder/tsconfig.json @@ -4,12 +4,7 @@ "composite": true, "declaration": true, "sourceMap": true, - "baseUrl": ".", - "paths": { - "@budibase/types": ["../types/src"], - "@budibase/backend-core": ["../backend-core/src"], - "@budibase/backend-core/*": ["../backend-core/*.js"] - } + "baseUrl": "." }, "ts-node": { "require": ["tsconfig-paths/register"] diff --git a/packages/pro b/packages/pro index 64a2025727..a590dc237a 160000 --- a/packages/pro +++ b/packages/pro @@ -1 +1 @@ -Subproject commit 64a2025727c25d5813832c92eb360de3947b7aa6 +Subproject commit a590dc237a16983b8f39dc8e65005b7736d23467 diff --git a/packages/server/src/utilities/fileSystem/app.ts b/packages/server/src/utilities/fileSystem/app.ts index f5e1f6e40e..0decf73a54 100644 --- a/packages/server/src/utilities/fileSystem/app.ts +++ b/packages/server/src/utilities/fileSystem/app.ts @@ -35,7 +35,7 @@ export const getComponentLibraryManifest = async (library: string) => { const filename = "manifest.json" if (env.isDev() || env.isTest()) { - const path = join(NODE_MODULES_PATH, "@budibase", "client", filename) + const path = join(TOP_LEVEL_PATH, "../client", filename) // always load from new so that updates are refreshed delete require.cache[require.resolve(path)] return require(path) diff --git a/packages/worker/jest.config.ts b/packages/worker/jest.config.ts index 2b0d8fe23b..49b6c5d425 100644 --- a/packages/worker/jest.config.ts +++ b/packages/worker/jest.config.ts @@ -16,6 +16,7 @@ const config: Config.InitialOptions = { "@budibase/backend-core/(.*)": "/../backend-core/$1", "@budibase/backend-core": "/../backend-core/src", "@budibase/types": "/../types/src", + "@budibase/shared-core": ["/../shared-core/src"], }, } diff --git a/packages/worker/src/tests/structures/groups.ts b/packages/worker/src/tests/structures/groups.ts index 33af533bd4..b0d6bb8fc0 100644 --- a/packages/worker/src/tests/structures/groups.ts +++ b/packages/worker/src/tests/structures/groups.ts @@ -18,7 +18,7 @@ export const UserGroup = () => { apps: [], color: generator.color(), icon: generator.word(), - name: generator.word({ length: 2 }), + name: generator.word(), roles: roles, users: [], } diff --git a/packages/worker/tsconfig.json b/packages/worker/tsconfig.json index 45c50934b3..0c0d948d27 100644 --- a/packages/worker/tsconfig.json +++ b/packages/worker/tsconfig.json @@ -16,11 +16,7 @@ "require": ["tsconfig-paths/register"], "swc": true }, - "references": [ - { "path": "../types" }, - { "path": "../backend-core" }, - { "path": "../../../budibase-pro/packages/pro" } - ], + "references": [{ "path": "../types" }, { "path": "../backend-core" }], "include": ["src/**/*"], "exclude": ["dist"] }