From 265c08f25cb60faedc9eca0e852d0495f249bc37 Mon Sep 17 00:00:00 2001 From: Roland Date: Wed, 8 May 2024 18:47:32 -0600 Subject: [PATCH] Testing that react app can be built and started. --- .circleci/config.yml | 43 +++++++++++++++++++++++++++++++++++++++---- app/package-lock.json | 31 +++++++++++++++++-------------- app/package.json | 1 + 3 files changed, 57 insertions(+), 18 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 881ba654..68ab0799 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -131,17 +131,52 @@ jobs: - run: name: Stop Sanic API command: pkill -f sanic + react-app-build: + docker: + - image: cimg/node:20.13 + resource_class: large + steps: + - checkout + - restore_cache: + key: dependency-cache-{{ checksum "app/package-lock.json" }} + - run: cd app && npm install --legacy-peer-deps + - run: + name: Build React App + command: cd app && DISABLE_ESLINT_PLUGIN=true npm run build + react-app-start: + docker: + - image: cimg/node:20.13 + resource_class: small + steps: + - checkout + - restore_cache: + key: dependency-cache-{{ checksum "app/package-lock.json" }} + - run: cd app && npm install --legacy-peer-deps + - run: + name: Start React App + command: | + cd app + npm run start + background: true + - run: + name: Test React App + command: | + sleep 20 + curl http://0.0.0.0:3000/manifest.json + - run: + name: Stop React App + command: pkill -f npm workflows: - wrolpi-sanic-tests: - jobs: - - sanic-api-start wrolpi-api-tests: jobs: + - sanic-api-start - api-tests-3-11 -# - api-tests-3-12 Sanic does not yet support 3.12. + # - api-tests-3-12 Sanic does not yet support 3.12. wrolpi-app-test: jobs: - app-tests-18 - app-tests-20 - app-tests-22 + - react-app-build + - react-app-start diff --git a/app/package-lock.json b/app/package-lock.json index 51833c9a..2cad5a68 100644 --- a/app/package-lock.json +++ b/app/package-lock.json @@ -25,6 +25,7 @@ "react-stl-viewer": "^2.5.0", "semantic-ui-offline": "^2.5.0", "semantic-ui-react": "^2.1.4", + "three": "^0.154", "web-vitals": "^2.1.4" } }, @@ -5744,9 +5745,9 @@ } }, "node_modules/caniuse-lite": { - "version": "1.0.30001450", - "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001450.tgz", - "integrity": "sha512-qMBmvmQmFXaSxexkjjfMvD5rnDL0+m+dUMZKoDYsGG8iZN29RuYh9eRoMvKsT6uMAWlyUUGDEQGJJYjzCIO9ew==", + "version": "1.0.30001616", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001616.tgz", + "integrity": "sha512-RHVYKov7IcdNjVHJFNY/78RdG4oGVjbayxv8u5IO74Wv7Hlq4PnJE6mo/OjFijjVFNy5ijnCt6H3IIo4t+wfEw==", "funding": [ { "type": "opencollective", @@ -5755,6 +5756,10 @@ { "type": "tidelift", "url": "https://tidelift.com/funding/github/npm/caniuse-lite" + }, + { + "type": "github", + "url": "https://github.com/sponsors/ai" } ] }, @@ -16405,10 +16410,9 @@ "integrity": "sha512-N+8UisAXDGk8PFXP4HAzVR9nbfmVJ3zYLAWiTIoqC5v5isinhr+r5uaO8+7r3BMfuNIufIsA7RdpVgacC2cSpw==" }, "node_modules/three": { - "version": "0.164.1", - "resolved": "https://registry.npmjs.org/three/-/three-0.164.1.tgz", - "integrity": "sha512-iC/hUBbl1vzFny7f5GtqzVXYjMJKaTPxiCxXfrvVdBi1Sf+jhd1CAkitiFwC7mIBFCo3MrDLJG97yisoaWig0w==", - "peer": true + "version": "0.154.0", + "resolved": "https://registry.npmjs.org/three/-/three-0.154.0.tgz", + "integrity": "sha512-Uzz8C/5GesJzv8i+Y2prEMYUwodwZySPcNhuJUdsVMH2Yn4Nm8qlbQe6qRN5fOhg55XB0WiLfTPBxVHxpE60ug==" }, "node_modules/three-stdlib": { "version": "2.17.2", @@ -21849,9 +21853,9 @@ } }, "caniuse-lite": { - "version": "1.0.30001450", - "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001450.tgz", - "integrity": "sha512-qMBmvmQmFXaSxexkjjfMvD5rnDL0+m+dUMZKoDYsGG8iZN29RuYh9eRoMvKsT6uMAWlyUUGDEQGJJYjzCIO9ew==" + "version": "1.0.30001616", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001616.tgz", + "integrity": "sha512-RHVYKov7IcdNjVHJFNY/78RdG4oGVjbayxv8u5IO74Wv7Hlq4PnJE6mo/OjFijjVFNy5ijnCt6H3IIo4t+wfEw==" }, "case-sensitive-paths-webpack-plugin": { "version": "2.4.0", @@ -29392,10 +29396,9 @@ "integrity": "sha512-N+8UisAXDGk8PFXP4HAzVR9nbfmVJ3zYLAWiTIoqC5v5isinhr+r5uaO8+7r3BMfuNIufIsA7RdpVgacC2cSpw==" }, "three": { - "version": "0.164.1", - "resolved": "https://registry.npmjs.org/three/-/three-0.164.1.tgz", - "integrity": "sha512-iC/hUBbl1vzFny7f5GtqzVXYjMJKaTPxiCxXfrvVdBi1Sf+jhd1CAkitiFwC7mIBFCo3MrDLJG97yisoaWig0w==", - "peer": true + "version": "0.154.0", + "resolved": "https://registry.npmjs.org/three/-/three-0.154.0.tgz", + "integrity": "sha512-Uzz8C/5GesJzv8i+Y2prEMYUwodwZySPcNhuJUdsVMH2Yn4Nm8qlbQe6qRN5fOhg55XB0WiLfTPBxVHxpE60ug==" }, "three-stdlib": { "version": "2.17.2", diff --git a/app/package.json b/app/package.json index fd5d7cda..12188acf 100644 --- a/app/package.json +++ b/app/package.json @@ -20,6 +20,7 @@ "react-stl-viewer": "^2.5.0", "semantic-ui-offline": "^2.5.0", "semantic-ui-react": "^2.1.4", + "three": "^0.154", "web-vitals": "^2.1.4" }, "scripts": {