From 3f8993ea2c830dbd8944c2d3f14d0ee27159af9f Mon Sep 17 00:00:00 2001 From: Alex Tkachev Date: Sun, 13 Oct 2024 12:49:26 +0400 Subject: [PATCH] chore: move server logs to /tmp --- .github/workflows/test.yml | 10 ++++++++++ .github/workflows/test_without_turbo_cache.yml | 10 ++++++++++ apps/website/package.json | 2 +- tests/e2e/playwright.config.decap.ts | 3 ++- tests/e2e/playwright.config.drupal.ts | 8 +++++--- tests/e2e/playwright.config.webforms.ts | 2 +- tests/schema/package.json | 2 +- 7 files changed, 30 insertions(+), 7 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index e3cb79b48..018a8703b 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -37,6 +37,16 @@ jobs: TURBO_TOKEN: 'local' TURBO_TEAM: 'local' + - name: 'Logs: cms' + run: cat /tmp/cms.log || true + if: always() + - name: 'Logs: website' + run: cat /tmp/website.log || true + if: always() + - name: 'Logs: preview' + run: cat /tmp/preview.log || true + if: always() + - name: Upload Playwright report uses: actions/upload-artifact@v4 if: failure() diff --git a/.github/workflows/test_without_turbo_cache.yml b/.github/workflows/test_without_turbo_cache.yml index 7faf17889..f82b5a4fe 100644 --- a/.github/workflows/test_without_turbo_cache.yml +++ b/.github/workflows/test_without_turbo_cache.yml @@ -34,6 +34,16 @@ jobs: TURBO_TOKEN: 'local' TURBO_TEAM: 'local' + - name: 'Logs: cms' + run: cat /tmp/cms.log || true + if: always() + - name: 'Logs: website' + run: cat /tmp/website.log || true + if: always() + - name: 'Logs: preview' + run: cat /tmp/preview.log || true + if: always() + - name: Upload Playwright report uses: actions/upload-artifact@v4 if: failure() diff --git a/apps/website/package.json b/apps/website/package.json index 8cc9661a9..1a4c90dbe 100644 --- a/apps/website/package.json +++ b/apps/website/package.json @@ -45,7 +45,7 @@ "scripts": { "test:static": "tsc --noEmit && eslint '**/*.{ts,tsx,js,jsx}' --ignore-path='./.gitignore'", "full-rebuild": "pnpm clean && pnpm build:gatsby", - "start:drupal": "pnpm run --filter @custom/cms start", + "start:drupal": "pnpm run --filter @custom/cms start >> /tmp/cms.log 2>&1", "build:drupal": "CLOUDINARY_CLOUDNAME=test pnpm start-test start:drupal 8888 build:gatsby", "build:gatsby": "gatsby build", "build": "if node has-drupal.mjs; then pnpm build:drupal; else pnpm build:gatsby; fi", diff --git a/tests/e2e/playwright.config.decap.ts b/tests/e2e/playwright.config.decap.ts index b9e48bd85..9a553f363 100644 --- a/tests/e2e/playwright.config.decap.ts +++ b/tests/e2e/playwright.config.decap.ts @@ -7,7 +7,8 @@ export default defineConfig({ testDir: './specs/decap', webServer: [ { - command: 'pnpm run --filter "@custom/website" serve', + command: + 'pnpm run --filter "@custom/website" serve >> /tmp/website.log 2>&1', port: 8000, reuseExistingServer: !process.env.CI, }, diff --git a/tests/e2e/playwright.config.drupal.ts b/tests/e2e/playwright.config.drupal.ts index a6e81801c..54027f2fb 100644 --- a/tests/e2e/playwright.config.drupal.ts +++ b/tests/e2e/playwright.config.drupal.ts @@ -7,17 +7,19 @@ export default defineConfig({ testDir: './specs/drupal', webServer: [ { - command: 'pnpm run --filter "@custom/cms" start', + command: 'pnpm run --filter "@custom/cms" start >> /tmp/cms.log 2>&1', port: 8888, reuseExistingServer: !process.env.CI, }, { - command: 'pnpm run --filter "@custom/website" serve', + command: + 'pnpm run --filter "@custom/website" serve >> /tmp/website.log 2>&1', port: 8000, reuseExistingServer: !process.env.CI, }, { - command: 'pnpm run --filter "@custom/preview" start', + command: + 'pnpm run --filter "@custom/preview" start >> /tmp/preview.log 2>&1', port: 8001, reuseExistingServer: !process.env.CI, }, diff --git a/tests/e2e/playwright.config.webforms.ts b/tests/e2e/playwright.config.webforms.ts index c8b91f32b..db2c897e8 100644 --- a/tests/e2e/playwright.config.webforms.ts +++ b/tests/e2e/playwright.config.webforms.ts @@ -7,7 +7,7 @@ export default defineConfig({ testDir: './webform-snapshots', webServer: [ { - command: 'pnpm run --filter "@custom/cms" start', + command: 'pnpm run --filter "@custom/cms" start >> /tmp/cms.log 2>&1', port: 8888, reuseExistingServer: !process.env.CI, }, diff --git a/tests/schema/package.json b/tests/schema/package.json index 3f4ab1b40..7a6548c05 100644 --- a/tests/schema/package.json +++ b/tests/schema/package.json @@ -3,7 +3,7 @@ "version": "1.0.0", "type": "module", "scripts": { - "start": "pnpm run --filter @custom/cms start", + "start": "pnpm run --filter @custom/cms start >> /tmp/cms.log 2>&1", "test:static": "tsc --noEmit && eslint '**/*.{ts,tsx,js,jsx}' --ignore-path='./.gitignore'", "test:integration": "CI=true start-server-and-test 8888 vitest", "test:integration:update": "CI=true start-server-and-test 8888 'vitest -u'",