Skip to content

Commit

Permalink
Merge branch 'development' into submission-status2
Browse files Browse the repository at this point in the history
  • Loading branch information
francisvaut committed May 15, 2024
2 parents 522ff18 + 51809de commit bffd2d5
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 5 deletions.
4 changes: 2 additions & 2 deletions backend/ypovoli/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,8 @@
# SECURITY WARNING: don't run with debug turned on in production!
DEBUG = environ.get("DJANGO_DEBUG", "False").lower() in ["true", "1", "t"]
DOMAIN_NAME = environ.get("DJANGO_DOMAIN_NAME", "localhost")
ALLOWED_HOSTS = [DOMAIN_NAME]
CSRF_TRUSTED_ORIGINS = ["https://" + DOMAIN_NAME]
ALLOWED_HOSTS = [DOMAIN_NAME, "nginx"]
CSRF_TRUSTED_ORIGINS = ["https://" + DOMAIN_NAME, "https://nginx"]

# Application definition
INSTALLED_APPS = [
Expand Down
4 changes: 4 additions & 0 deletions frontend/Dockerfile.cypress
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
ARG CHROME_VERSION="114.0.5735.133-1"
ARG NODE_VERSION="18.17.1"

FROM cypress/factory
2 changes: 1 addition & 1 deletion frontend/cypress.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { defineConfig } from 'cypress';

export default defineConfig({
e2e: {
baseUrl: 'http://nginx',
baseUrl: 'https://nginx',
specPattern: 'src/test/e2e/**/*.cy.{js,jsx,ts,tsx}',
},
});
2 changes: 1 addition & 1 deletion test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ fi
exit_code=0

echo "-----------------"
if [ $vitest_exit -ne 0 ] || [ $django_exit -ne 0 ]; then
if [ $cypress_exit -ne 0 ] || [ $vitest_exit -ne 0 ] || [ $django_exit -ne 0 ]; then
echo "Tests failed:"
if [ $cypress_exit -ne 0 ]; then
echo " - Cypress"
Expand Down
10 changes: 9 additions & 1 deletion test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,8 @@ services:
command: sh -c "./setup.sh && python manage.py runsslserver 0.0.0.0:8000"
volumes:
- $BACKEND_DIR:/code
depends_on:
- redis

celery:
<<: *common-keys-selab_test
Expand Down Expand Up @@ -89,7 +91,13 @@ services:
cypress:
<<: *common-keys-selab_test
container_name: cypress
image: cypress/included:cypress-12.17.3-node-18.16.0-chrome-114.0.5735.133-1-ff-114.0.2-edge-114.0.1823.51-1
build:
context: $FRONTEND_DIR
dockerfile: Dockerfile.cypress
command: sh -c "npm install && npm run cypress:test"
working_dir: /e2e
volumes:
- ${FRONTEND_DIR}:/e2e
- /e2e/node_modules
depends_on:
- frontend

0 comments on commit bffd2d5

Please sign in to comment.