From 08c390113485cb59df8c8ac24cc221087800ad0a Mon Sep 17 00:00:00 2001 From: Alejandro Alonso Date: Thu, 6 Jun 2024 07:48:41 +0200 Subject: [PATCH] :sparkles: Speed up e2e testing --- .circleci/config.yml | 2 +- frontend/package.json | 1 + frontend/scripts/e2e-server.js | 4 ++++ frontend/yarn.lock | 1 + 4 files changed, 7 insertions(+), 1 deletion(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 70ba3b801..13074f6bf 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -108,7 +108,7 @@ jobs: command: | yarn install yarn run compile - yarn run compile:cljs + clojure -M:dev:shadow-cljs release main yarn playwright install --with-deps chromium yarn e2e:test diff --git a/frontend/package.json b/frontend/package.json index 64b8d826b..51cf909c4 100644 --- a/frontend/package.json +++ b/frontend/package.json @@ -90,6 +90,7 @@ "workerpool": "^9.1.1" }, "dependencies": { + "compression": "^1.7.4", "date-fns": "^3.6.0", "eventsource-parser": "^1.1.2", "highlight.js": "^11.9.0", diff --git a/frontend/scripts/e2e-server.js b/frontend/scripts/e2e-server.js index 4c441d21c..c05743813 100644 --- a/frontend/scripts/e2e-server.js +++ b/frontend/scripts/e2e-server.js @@ -1,10 +1,14 @@ import express from "express"; +import compression from "compression"; + import { fileURLToPath } from "url"; import path from "path"; const app = express(); const port = 3000; +app.use(compression()); + const staticPath = path.join(fileURLToPath(import.meta.url), "../../resources/public"); app.use(express.static(staticPath)); diff --git a/frontend/yarn.lock b/frontend/yarn.lock index c93f4b041..ce42f642a 100644 --- a/frontend/yarn.lock +++ b/frontend/yarn.lock @@ -7924,6 +7924,7 @@ __metadata: "@types/node": "npm:^20.11.20" animate.css: "npm:^4.1.1" autoprefixer: "npm:^10.4.19" + compression: "npm:^1.7.4" concurrently: "npm:^8.2.2" date-fns: "npm:^3.6.0" draft-js: "git+https://github.com/penpot/draft-js.git#commit=4a99b2a6020b2af97f6dc5fa1b4275ec16b559a0"