From 53feaef9af8f4c39006ac31096dc62c5cd2ecc1f Mon Sep 17 00:00:00 2001 From: Emily Date: Sun, 1 Sep 2024 13:31:30 +0200 Subject: [PATCH] Fix playwright CI? --- .github/workflows/playwright.yml | 4 +-- package-lock.json | 43 ++++++++++++++++++++++++++++++++ package.json | 1 + 3 files changed, 46 insertions(+), 2 deletions(-) diff --git a/.github/workflows/playwright.yml b/.github/workflows/playwright.yml index 5948427..0be177e 100644 --- a/.github/workflows/playwright.yml +++ b/.github/workflows/playwright.yml @@ -52,7 +52,7 @@ jobs: run: npm ci - name: Create DB tables - run: npx prisma db push + run: npx dotenv -e .env -- prisma db push # Note: we always install Chromium because we use it in playwright-setup.ts, but ideally it should be fixed - name: Install Playwright @@ -63,7 +63,7 @@ jobs: # Note: Playwright will start the server by itself, see playwright.config.ts - name: Run Playwright tests - run: npx playwright test --browser ${{ matrix.browser }} + run: npx dotenv -e .env -- playwright test --browser ${{ matrix.browser }} - uses: actions/upload-artifact@v3 if: always() diff --git a/package-lock.json b/package-lock.json index 001c68a..9426c0e 100644 --- a/package-lock.json +++ b/package-lock.json @@ -105,6 +105,7 @@ "@types/turndown": "^5.0.1", "@types/validator": "^13.9.0", "@typescript-eslint/eslint-plugin": "^6.2.1", + "dotenv-cli": "^7.4.2", "esbuild": "^0.18.18", "eslint": "^8.46.0", "eslint-config-next": "13.4.12", @@ -6607,6 +6608,30 @@ "url": "https://github.com/motdotla/dotenv?sponsor=1" } }, + "node_modules/dotenv-cli": { + "version": "7.4.2", + "resolved": "https://registry.npmjs.org/dotenv-cli/-/dotenv-cli-7.4.2.tgz", + "integrity": "sha512-SbUj8l61zIbzyhIbg0FwPJq6+wjbzdn9oEtozQpZ6kW2ihCcapKVZj49oCT3oPM+mgQm+itgvUQcG5szxVrZTA==", + "dev": true, + "dependencies": { + "cross-spawn": "^7.0.3", + "dotenv": "^16.3.0", + "dotenv-expand": "^10.0.0", + "minimist": "^1.2.6" + }, + "bin": { + "dotenv": "cli.js" + } + }, + "node_modules/dotenv-expand": { + "version": "10.0.0", + "resolved": "https://registry.npmjs.org/dotenv-expand/-/dotenv-expand-10.0.0.tgz", + "integrity": "sha512-GopVGCpVS1UKH75VKHGuQFqS1Gusej0z4FyQkPdwjil2gNIv+LNsqBlboOzpJFZKVT95GkCyWJbBSdFEFUWI2A==", + "dev": true, + "engines": { + "node": ">=12" + } + }, "node_modules/dset": { "version": "3.1.2", "resolved": "https://registry.npmjs.org/dset/-/dset-3.1.2.tgz", @@ -18939,6 +18964,24 @@ "integrity": "sha512-IPzF4w4/Rd94bA9imS68tZBaYyBWSCE47V1RGuMrB94iyTOIEwRmVL2x/4An+6mETpLrKJ5hQkB8W4kFAadeIQ==", "dev": true }, + "dotenv-cli": { + "version": "7.4.2", + "resolved": "https://registry.npmjs.org/dotenv-cli/-/dotenv-cli-7.4.2.tgz", + "integrity": "sha512-SbUj8l61zIbzyhIbg0FwPJq6+wjbzdn9oEtozQpZ6kW2ihCcapKVZj49oCT3oPM+mgQm+itgvUQcG5szxVrZTA==", + "dev": true, + "requires": { + "cross-spawn": "^7.0.3", + "dotenv": "^16.3.0", + "dotenv-expand": "^10.0.0", + "minimist": "^1.2.6" + } + }, + "dotenv-expand": { + "version": "10.0.0", + "resolved": "https://registry.npmjs.org/dotenv-expand/-/dotenv-expand-10.0.0.tgz", + "integrity": "sha512-GopVGCpVS1UKH75VKHGuQFqS1Gusej0z4FyQkPdwjil2gNIv+LNsqBlboOzpJFZKVT95GkCyWJbBSdFEFUWI2A==", + "dev": true + }, "dset": { "version": "3.1.2", "resolved": "https://registry.npmjs.org/dset/-/dset-3.1.2.tgz", diff --git a/package.json b/package.json index 725d45d..65ce0de 100644 --- a/package.json +++ b/package.json @@ -111,6 +111,7 @@ "@types/turndown": "^5.0.1", "@types/validator": "^13.9.0", "@typescript-eslint/eslint-plugin": "^6.2.1", + "dotenv-cli": "^7.4.2", "esbuild": "^0.18.18", "eslint": "^8.46.0", "eslint-config-next": "13.4.12",