From cae416807ac28432f0dd3b9119db37339edab259 Mon Sep 17 00:00:00 2001 From: kevin olson Date: Fri, 23 Aug 2024 20:44:53 -0500 Subject: [PATCH 01/17] =?UTF-8?q?=F0=9F=A7=AA=20alright=20lets=20see=20wha?= =?UTF-8?q?t=20happens=20here?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/test.yml | 7 ++++++- package.json | 1 + 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 9def5f5..11120d1 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -61,11 +61,16 @@ jobs: - name: Run Migrations run: pnpm run db:test:reset + - uses: JarvusInnovations/background-action@v1 + with: + run: pnpm run dev:test + wait-on: http://localhost:3000 + - name: Run Vitest env: NUXT_UI_PRO_LICENSE: ${{ secrets.NUXT_UI_PRO_LICENSE }} NODE_ENV: test - run: pnpm run test:coverage + run: pnpm run test:dev:coverage - name: Report Coverage if: always() uses: davelosert/vitest-coverage-report-action@v2 diff --git a/package.json b/package.json index bb9c2f7..dcd6ca2 100644 --- a/package.json +++ b/package.json @@ -15,6 +15,7 @@ "test:dev:reset": "pnpm run db:test:reset; DEVRUN=true vitest run", "db:test:reset": "dotenv -e .env.test -- npx prisma migrate reset --force", "test:coverage": "vitest run --coverage.enabled true", + "test:dev:coverage": "DEVRUN=true vitest run --coverage.enabled true", "lint": "eslint .", "lint:fix": "eslint . --fix", "lint:action": "pnpm run lint -f @jamesacarr/github-actions" From e5f08b437374ea05c66412c86cf38293e47db4f9 Mon Sep 17 00:00:00 2001 From: kevin olson Date: Fri, 23 Aug 2024 20:52:21 -0500 Subject: [PATCH 02/17] =?UTF-8?q?=F0=9F=A7=AA=20alright=20lets=20see=20wha?= =?UTF-8?q?t=20happens=20here=20round=202?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/test.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 11120d1..513fc14 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -2,6 +2,8 @@ name: Run Tests on: pull_request +env: + DEVRUN: true jobs: test: if: github.event.pull_request.draft == false @@ -71,6 +73,7 @@ jobs: NUXT_UI_PRO_LICENSE: ${{ secrets.NUXT_UI_PRO_LICENSE }} NODE_ENV: test run: pnpm run test:dev:coverage + - name: Report Coverage if: always() uses: davelosert/vitest-coverage-report-action@v2 From a960c4e420b6c862b652af92f84333fbee49fa42 Mon Sep 17 00:00:00 2001 From: kevin olson Date: Fri, 23 Aug 2024 20:58:48 -0500 Subject: [PATCH 03/17] =?UTF-8?q?=F0=9F=A7=AA=20alright=20lets=20see=20wha?= =?UTF-8?q?t=20happens=20here=20round=203?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- test/config.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/test/config.ts b/test/config.ts index 768fa6d..2b58ee2 100644 --- a/test/config.ts +++ b/test/config.ts @@ -1,4 +1,5 @@ function setupConfig() { + console.log('process.env.DEVRUN', process.env.DEVRUN) if (process.env.DEVRUN === 'true' && !process.env.CI) return { host: 'http://localhost:3000' } else From f5b179a25a5916ee2a707cec48d18b4bf9d51b3d Mon Sep 17 00:00:00 2001 From: kevin olson Date: Fri, 23 Aug 2024 21:04:19 -0500 Subject: [PATCH 04/17] =?UTF-8?q?=F0=9F=A7=AA=20alright=20lets=20see=20wha?= =?UTF-8?q?t=20happens=20here=20round=204?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/test.yml | 1 + test/config.ts | 6 +----- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 513fc14..21df2ec 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -67,6 +67,7 @@ jobs: with: run: pnpm run dev:test wait-on: http://localhost:3000 + tail: true - name: Run Vitest env: diff --git a/test/config.ts b/test/config.ts index 2b58ee2..aab3638 100644 --- a/test/config.ts +++ b/test/config.ts @@ -1,9 +1,5 @@ function setupConfig() { - console.log('process.env.DEVRUN', process.env.DEVRUN) - if (process.env.DEVRUN === 'true' && !process.env.CI) - return { host: 'http://localhost:3000' } - else - return {} + return { host: 'http://localhost:3000' } } export { From a890130497625bc06f35eead367a7fd576dcef1b Mon Sep 17 00:00:00 2001 From: kevin olson Date: Fri, 23 Aug 2024 21:04:43 -0500 Subject: [PATCH 05/17] =?UTF-8?q?=F0=9F=A7=AA=20alright=20lets=20see=20wha?= =?UTF-8?q?t=20happens=20here=20round=205?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/test.yml | 5 ----- 1 file changed, 5 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 21df2ec..a1aae54 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -52,11 +52,6 @@ jobs: - name: Generate Prisma deps run: npx prisma generate - - name: Build - env: - NUXT_UI_PRO_LICENSE: ${{ secrets.NUXT_UI_PRO_LICENSE }} - run: pnpm run build - - name: Rename .env.test-action to .env.test run: mv .env.test-action .env.test From 9f1c669b540bd1ba3c2e436a267c96607e37e868 Mon Sep 17 00:00:00 2001 From: kevin olson Date: Fri, 23 Aug 2024 21:07:58 -0500 Subject: [PATCH 06/17] =?UTF-8?q?=F0=9F=A7=AA=20alright=20lets=20see=20wha?= =?UTF-8?q?t=20happens=20here=20round=206?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/test.yml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index a1aae54..21df2ec 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -52,6 +52,11 @@ jobs: - name: Generate Prisma deps run: npx prisma generate + - name: Build + env: + NUXT_UI_PRO_LICENSE: ${{ secrets.NUXT_UI_PRO_LICENSE }} + run: pnpm run build + - name: Rename .env.test-action to .env.test run: mv .env.test-action .env.test From 0c394534a888b6790a004236590c566fa8b54ce6 Mon Sep 17 00:00:00 2001 From: kevin olson Date: Fri, 23 Aug 2024 21:11:31 -0500 Subject: [PATCH 07/17] =?UTF-8?q?=E2=99=BB=EF=B8=8F=20pull=20the=20tail?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/test.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 21df2ec..513fc14 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -67,7 +67,6 @@ jobs: with: run: pnpm run dev:test wait-on: http://localhost:3000 - tail: true - name: Run Vitest env: From 7b8edd9d1097a54307741eb1dc058064b939114f Mon Sep 17 00:00:00 2001 From: kevin olson Date: Fri, 23 Aug 2024 21:11:55 -0500 Subject: [PATCH 08/17] =?UTF-8?q?=E2=99=BB=EF=B8=8F=20swap=20migrations?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/test.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 513fc14..880d45b 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -60,14 +60,14 @@ jobs: - name: Rename .env.test-action to .env.test run: mv .env.test-action .env.test - - name: Run Migrations - run: pnpm run db:test:reset - - uses: JarvusInnovations/background-action@v1 with: run: pnpm run dev:test wait-on: http://localhost:3000 + - name: Run Migrations + run: pnpm run db:test:reset + - name: Run Vitest env: NUXT_UI_PRO_LICENSE: ${{ secrets.NUXT_UI_PRO_LICENSE }} From 3784a1871f7e933c3d6a0cbe5c3e4ea399a9c155 Mon Sep 17 00:00:00 2001 From: kevin olson Date: Fri, 23 Aug 2024 21:15:07 -0500 Subject: [PATCH 09/17] =?UTF-8?q?=F0=9F=A7=AA=20try=20a=20normal=20backgro?= =?UTF-8?q?und=20run?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/test.yml | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 880d45b..5cb6587 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -60,10 +60,8 @@ jobs: - name: Rename .env.test-action to .env.test run: mv .env.test-action .env.test - - uses: JarvusInnovations/background-action@v1 - with: - run: pnpm run dev:test - wait-on: http://localhost:3000 + - name: Run dev:test in the background + run: pnpm run dev:test & - name: Run Migrations run: pnpm run db:test:reset From 3dd711085bf1390811c0f9e52561899dad10cd8d Mon Sep 17 00:00:00 2001 From: kevin olson Date: Fri, 23 Aug 2024 21:17:56 -0500 Subject: [PATCH 10/17] =?UTF-8?q?=F0=9F=A7=AA=20try=20a=20normal=20backgro?= =?UTF-8?q?und=20run=20-=20add=20a=20sleep=2030s?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/test.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 5cb6587..00eb407 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -63,6 +63,9 @@ jobs: - name: Run dev:test in the background run: pnpm run dev:test & + - name: Sleep for 30 seconds + run: sleep 30s + - name: Run Migrations run: pnpm run db:test:reset From bd05bd167b9af4a345f5fa90bc32f4622cd4e1e0 Mon Sep 17 00:00:00 2001 From: kevin olson Date: Fri, 23 Aug 2024 21:26:52 -0500 Subject: [PATCH 11/17] =?UTF-8?q?=E2=99=BB=EF=B8=8F=20lets=20just=20run=20?= =?UTF-8?q?the=20server=20from=20the=20build=20see=20what=20happens?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/test.yml | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 00eb407..37b8688 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -55,17 +55,13 @@ jobs: - name: Build env: NUXT_UI_PRO_LICENSE: ${{ secrets.NUXT_UI_PRO_LICENSE }} - run: pnpm run build + run: | + pnpm run build + node .output/server/index.mjs - name: Rename .env.test-action to .env.test run: mv .env.test-action .env.test - - name: Run dev:test in the background - run: pnpm run dev:test & - - - name: Sleep for 30 seconds - run: sleep 30s - - name: Run Migrations run: pnpm run db:test:reset From 2c9bc5156f233697913f16d1483b5c870a85d9bc Mon Sep 17 00:00:00 2001 From: kevin olson Date: Fri, 23 Aug 2024 21:28:47 -0500 Subject: [PATCH 12/17] =?UTF-8?q?=E2=99=BB=EF=B8=8F=20its=20gotta=20run=20?= =?UTF-8?q?in=20the=20background?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 37b8688..2f8ea27 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -57,7 +57,7 @@ jobs: NUXT_UI_PRO_LICENSE: ${{ secrets.NUXT_UI_PRO_LICENSE }} run: | pnpm run build - node .output/server/index.mjs + node .output/server/index.mjs & - name: Rename .env.test-action to .env.test run: mv .env.test-action .env.test From 1f6f0b65b56cf522cffc2c268eb9753ee13fd7cd Mon Sep 17 00:00:00 2001 From: kevin olson Date: Fri, 23 Aug 2024 21:34:38 -0500 Subject: [PATCH 13/17] =?UTF-8?q?=E2=99=BB=EF=B8=8F=20need=20the=20right?= =?UTF-8?q?=20.env=20file?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/test.yml | 4 ++-- test/config.ts | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 2f8ea27..92c0126 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -59,8 +59,8 @@ jobs: pnpm run build node .output/server/index.mjs & - - name: Rename .env.test-action to .env.test - run: mv .env.test-action .env.test + - name: Rename .env.test-action to .env + run: mv .env.test-action .env - name: Run Migrations run: pnpm run db:test:reset diff --git a/test/config.ts b/test/config.ts index aab3638..9ce0e76 100644 --- a/test/config.ts +++ b/test/config.ts @@ -1,5 +1,5 @@ function setupConfig() { - return { host: 'http://localhost:3000' } + return { host: 'http://[::]:3000' } } export { From b3da5d6f65281c7a1227138bc51c17d394bcdeaa Mon Sep 17 00:00:00 2001 From: kevin olson Date: Fri, 23 Aug 2024 21:37:06 -0500 Subject: [PATCH 14/17] =?UTF-8?q?=E2=99=BB=EF=B8=8F=20need=20the=20right?= =?UTF-8?q?=20.env=20file?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/test.yml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 92c0126..6189669 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -59,8 +59,10 @@ jobs: pnpm run build node .output/server/index.mjs & - - name: Rename .env.test-action to .env - run: mv .env.test-action .env + - name: Copy .env.test-action to .env.test and .env + run: | + cp .env.test-action .env.test + cp .env.test-action .env - name: Run Migrations run: pnpm run db:test:reset From 408995d35412daacac0e8380c9ed1bb4cd7fe65a Mon Sep 17 00:00:00 2001 From: kevin olson Date: Fri, 23 Aug 2024 21:38:59 -0500 Subject: [PATCH 15/17] =?UTF-8?q?=E2=99=BB=EF=B8=8F=20env=20file=20change?= =?UTF-8?q?=20needs=20to=20happen=20before?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/test.yml | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 6189669..8635772 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -52,18 +52,17 @@ jobs: - name: Generate Prisma deps run: npx prisma generate + - name: Copy .env.test-action to .env.test and .env + run: | + cp .env.test-action .env.test + cp .env.test-action .env + - name: Build env: NUXT_UI_PRO_LICENSE: ${{ secrets.NUXT_UI_PRO_LICENSE }} run: | pnpm run build node .output/server/index.mjs & - - - name: Copy .env.test-action to .env.test and .env - run: | - cp .env.test-action .env.test - cp .env.test-action .env - - name: Run Migrations run: pnpm run db:test:reset From 708b4cf7bf75ac2e204ec461f6ff075adf3c5ebe Mon Sep 17 00:00:00 2001 From: kevin olson Date: Fri, 23 Aug 2024 21:43:42 -0500 Subject: [PATCH 16/17] =?UTF-8?q?=E2=99=BB=EF=B8=8F=20back=20to=20how=20it?= =?UTF-8?q?=20was?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/test.yml | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 8635772..80e7918 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -53,19 +53,22 @@ jobs: run: npx prisma generate - name: Copy .env.test-action to .env.test and .env - run: | - cp .env.test-action .env.test - cp .env.test-action .env + run: cp .env.test-action .env.test - name: Build env: NUXT_UI_PRO_LICENSE: ${{ secrets.NUXT_UI_PRO_LICENSE }} - run: | - pnpm run build - node .output/server/index.mjs & + run: pnpm run build + + - name: Start Server + run: pnpm run dev:test & + - name: Run Migrations run: pnpm run db:test:reset + - name: Sleep for 10 seconds + run: sleep 10 + - name: Run Vitest env: NUXT_UI_PRO_LICENSE: ${{ secrets.NUXT_UI_PRO_LICENSE }} From 30637aec0109e3e588e92c5e790ad28eb18e1500 Mon Sep 17 00:00:00 2001 From: kevin olson Date: Fri, 23 Aug 2024 21:46:36 -0500 Subject: [PATCH 17/17] =?UTF-8?q?=F0=9F=94=A7=20update=20copy?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 80e7918..ee78659 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -52,7 +52,7 @@ jobs: - name: Generate Prisma deps run: npx prisma generate - - name: Copy .env.test-action to .env.test and .env + - name: Copy .env.test-action to .env.test run: cp .env.test-action .env.test - name: Build