diff --git a/.github/workflows/test_frontend.yml b/.github/workflows/test_frontend.yml index 44137216b..e5b27f65c 100644 --- a/.github/workflows/test_frontend.yml +++ b/.github/workflows/test_frontend.yml @@ -33,7 +33,7 @@ jobs: uses: actions/checkout@v3 - name: Frontend | Build 'test' image - run: docker build --target test -t "gradido/frontend:test" frontend/ --build-arg NODE_ENV="test" + run: docker compose -f docker-compose.yml -f docker-compose.test.yml up --no-deps frontend unit_test: if: needs.files-changed.outputs.frontend == 'true' diff --git a/config/common.schema.js b/config/common.schema.js index 13e1b25f7..0b2057700 100644 --- a/config/common.schema.js +++ b/config/common.schema.js @@ -169,7 +169,7 @@ module.exports = { .required(), NODE_ENV: Joi.string() - .valid('production', 'development') + .valid('production', 'development', 'test') .default('development') .description('Specifies the environment in which the application is running.'), diff --git a/frontend/package.json b/frontend/package.json index 4cd7c9618..62dd7c94b 100755 --- a/frontend/package.json +++ b/frontend/package.json @@ -88,7 +88,7 @@ "eslint-plugin-vitest": "^0.5.4", "eslint-plugin-vue": "8.7.1", "joi": "^17.13.3", - "jsdom": "^25.0.0", + "jsdom": "^25.0.0", "mock-apollo-client": "^1.2.1", "postcss": "^8.4.8", "postcss-html": "^1.3.0", diff --git a/frontend/src/config/schema.js b/frontend/src/config/schema.js index a840a8510..31eb9c737 100644 --- a/frontend/src/config/schema.js +++ b/frontend/src/config/schema.js @@ -89,7 +89,7 @@ module.exports = Joi.object({ Joi.string() .ip({ version: ['ipv4'] }) .messages({ 'string.ip': 'Must be a valid IPv4 address' }), - Joi.string().domain().messages({ 'string.domain': 'Must be a valid domain' }) + Joi.string().domain().messages({ 'string.domain': 'Must be a valid domain' }), ) .when('FRONTEND_HOSTING', { is: 'nodejs',