diff --git a/.github/workflows/_shared-build.yaml b/.github/workflows/_shared-build.yaml index 097683db..d709beab 100644 --- a/.github/workflows/_shared-build.yaml +++ b/.github/workflows/_shared-build.yaml @@ -55,8 +55,15 @@ jobs: uses: actions/setup-node@v4 with: node-version: 20.x - cache: 'npm' - cache-dependency-path: ./ui-package/package-lock.json + - name: Cache node-modules for UI package + id: cache-npm + uses: actions/cache@v3 + with: + path: ./ui-package/node_modules + key: uipackage-npm-${{ runner.os }}-${{ hashFiles('./ui-package/package-lock.json') }} + restore-keys: | + uipackage-npm-${{ runner.os }}- + uipackage-npm- # build UI package - name: Build UI package diff --git a/.github/workflows/_shared-check.yaml b/.github/workflows/_shared-check.yaml index a686236e..a8c93ca4 100644 --- a/.github/workflows/_shared-check.yaml +++ b/.github/workflows/_shared-check.yaml @@ -16,6 +16,19 @@ jobs: uses: actions/setup-go@v4 with: go-version: 1.22.x + - name: Set up node + uses: actions/setup-node@v4 + with: + node-version: 20.x + - name: Cache node-modules for UI package + id: cache-npm + uses: actions/cache@v3 + with: + path: ./ui-package/node_modules + key: uipackage-npm-${{ runner.os }}-${{ hashFiles('./ui-package/package-lock.json') }} + restore-keys: | + uipackage-npm-${{ runner.os }}- + uipackage-npm- - name: Prepare test environment run: mkdir -p ui-package/dist && touch ui-package/dist/dummy @@ -41,3 +54,10 @@ jobs: - name: Run tests run: go test -race -vet=off ./... + + + # build UI package + - name: Build UI package + run: | + make build-ui + \ No newline at end of file diff --git a/ui-package/package-lock.json b/ui-package/package-lock.json index 26dc427a..36de3a8a 100644 --- a/ui-package/package-lock.json +++ b/ui-package/package-lock.json @@ -26,6 +26,7 @@ "@babel/core": "^7.25.2", "@babel/plugin-proposal-class-properties": "^7.18.6", "@babel/plugin-proposal-object-rest-spread": "^7.20.7", + "@babel/plugin-syntax-dynamic-import": "^7.8.3", "@babel/preset-env": "^7.25.3", "@babel/preset-flow": "^7.24.7", "@babel/preset-react": "^7.24.7", @@ -587,6 +588,19 @@ "@babel/core": "^7.0.0-0" } }, + "node_modules/@babel/plugin-syntax-dynamic-import": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-dynamic-import/-/plugin-syntax-dynamic-import-7.8.3.tgz", + "integrity": "sha512-5gdGbFon+PszYzqs83S3E5mpi7/y/8M9eC90MRTZfduQOYW76ig6SOSPNe41IG5LoP3FGBn2N0RjVDSQiS94kQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-plugin-utils": "^7.8.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, "node_modules/@babel/plugin-syntax-flow": { "version": "7.26.0", "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-flow/-/plugin-syntax-flow-7.26.0.tgz", @@ -4928,9 +4942,9 @@ } }, "node_modules/cross-spawn": { - "version": "7.0.3", - "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz", - "integrity": "sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==", + "version": "7.0.6", + "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.6.tgz", + "integrity": "sha512-uV2QOWP2nWzsy2aMp8aRibhi9dlzF5Hgh5SHaB9OiTGEyDTiJJyx0uy51QXdyWbtAHNua4XJzUKca3OzKUd3vA==", "license": "MIT", "dependencies": { "path-key": "^3.1.0", diff --git a/ui-package/package.json b/ui-package/package.json index 2d4f9488..a4d34c39 100644 --- a/ui-package/package.json +++ b/ui-package/package.json @@ -8,6 +8,7 @@ "@babel/core": "^7.25.2", "@babel/plugin-proposal-class-properties": "^7.18.6", "@babel/plugin-proposal-object-rest-spread": "^7.20.7", + "@babel/plugin-syntax-dynamic-import": "^7.8.3", "@babel/preset-env": "^7.25.3", "@babel/preset-flow": "^7.24.7", "@babel/preset-react": "^7.24.7",