Testing that react app can be built and started.

This commit is contained in:
Roland 2024-05-08 18:47:32 -06:00
parent 3a1e0282c4
commit 265c08f25c
No known key found for this signature in database
GPG key ID: 9D6DBD3ACF11AB93
3 changed files with 57 additions and 18 deletions

View file

@ -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

31
app/package-lock.json generated
View file

@ -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",

View file

@ -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": {