From 1eb8f76fb89e880d276d2f28530fd705bee71d2b Mon Sep 17 00:00:00 2001 From: alexander-schefe Date: Mon, 11 Aug 2025 14:21:50 +0200 Subject: [PATCH 1/3] chore: added case for optional aws cache invalidation distribution id and removed unneeded e2e secrets --- .github/workflows/reusable-deploy-job.yml | 2 +- .github/workflows/reusable-e2e-test-job.yml | 7 ------- packages/e2e/playwright.config.ts | 5 ----- packages/e2e/tests/entry.spec.ts | 1 - 4 files changed, 1 insertion(+), 14 deletions(-) diff --git a/.github/workflows/reusable-deploy-job.yml b/.github/workflows/reusable-deploy-job.yml index 50c0d53..6668b56 100644 --- a/.github/workflows/reusable-deploy-job.yml +++ b/.github/workflows/reusable-deploy-job.yml @@ -98,5 +98,5 @@ jobs: continue-on-error: true run: | aws cloudfront create-invalidation \ - --distribution-id ${{ secrets.AWS_FRONTEND_DISTRIBUTION_ID }} \ + --distribution-id ${{ inputs.target == 'production' && secrets.AWS_PRODUCTION_FRONTEND_DISTRIBUTION_ID || secrets.AWS_STAGING_FRONTEND_DISTRIBUTION_ID }} \ --paths "/*" diff --git a/.github/workflows/reusable-e2e-test-job.yml b/.github/workflows/reusable-e2e-test-job.yml index 9ef55b1..2c3c2a5 100644 --- a/.github/workflows/reusable-e2e-test-job.yml +++ b/.github/workflows/reusable-e2e-test-job.yml @@ -15,8 +15,6 @@ jobs: env: USER_ID: ${{ secrets.TEST_TRAINEE_ID }} URL: ${{ secrets.FRONTEND_URL }} - BASICAUTHENTICATION_USERNAME: ${{ secrets.BASICAUTHENTICATION_USERNAME }} - BASICAUTHENTICATION_PASSWORD: ${{ secrets.BASICAUTHENTICATION_PASSWORD }} ENVIRONMENT_NAME: staging steps: - uses: actions/checkout@v4 @@ -42,11 +40,6 @@ jobs: npx playwright install npx playwright test --output test-results --config playwright.config.ts - - if: failure() - run: | - cd packages/e2e - npx playwright show-trace test-results/tests-entry-entry-switch-language-chromium/trace.zip - - name: Upload Playwright test results if: failure() uses: actions/upload-artifact@v4 diff --git a/packages/e2e/playwright.config.ts b/packages/e2e/playwright.config.ts index 8605f64..813c5e7 100644 --- a/packages/e2e/playwright.config.ts +++ b/packages/e2e/playwright.config.ts @@ -1,6 +1,5 @@ // playwright.config.ts import { PlaywrightTestConfig, devices } from '@playwright/test' -const { BASICAUTHENTICATION_USERNAME, BASICAUTHENTICATION_PASSWORD } = process.env const config: PlaywrightTestConfig = { forbidOnly: !!process.env.CI, @@ -14,10 +13,6 @@ const config: PlaywrightTestConfig = { name: 'chromium', use: { ...devices['Desktop Chrome'], - httpCredentials: { - username: BASICAUTHENTICATION_USERNAME ? BASICAUTHENTICATION_USERNAME : '', - password: BASICAUTHENTICATION_PASSWORD ? BASICAUTHENTICATION_PASSWORD : '', - }, }, }, // { diff --git a/packages/e2e/tests/entry.spec.ts b/packages/e2e/tests/entry.spec.ts index d7e3785..65d7193 100644 --- a/packages/e2e/tests/entry.spec.ts +++ b/packages/e2e/tests/entry.spec.ts @@ -8,7 +8,6 @@ URL ??= 'http://localhost:8080' async function goto(page: Page, path: string = '') { await page.goto(`${URL}${path}`) const statusBar = page.locator('#status-bar') - await statusBar.waitFor({ timeout: 10000 }) await statusBar.hover() const input = page.locator('#dev-login-user-id') From d524d7bc75321c9b892073d1f7af17b9b5ded47b Mon Sep 17 00:00:00 2001 From: alexander-schefe Date: Mon, 11 Aug 2025 14:24:05 +0200 Subject: [PATCH 2/3] chore: readded e2e retries --- packages/e2e/playwright.config.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/e2e/playwright.config.ts b/packages/e2e/playwright.config.ts index 813c5e7..7eb1e20 100644 --- a/packages/e2e/playwright.config.ts +++ b/packages/e2e/playwright.config.ts @@ -3,7 +3,7 @@ import { PlaywrightTestConfig, devices } from '@playwright/test' const config: PlaywrightTestConfig = { forbidOnly: !!process.env.CI, - retries: 0, + retries: process.env.CI ? 2 : 0, outputDir: 'test-results', use: { trace: 'on', From 3c71d74b45bff040e582c4bb65fd6ba7683f6cbf Mon Sep 17 00:00:00 2001 From: alexander-schefe Date: Mon, 11 Aug 2025 14:48:04 +0200 Subject: [PATCH 3/3] fix: use environment secrets instead of if-case for distribution id --- .github/workflows/reusable-deploy-job.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/reusable-deploy-job.yml b/.github/workflows/reusable-deploy-job.yml index 6668b56..50c0d53 100644 --- a/.github/workflows/reusable-deploy-job.yml +++ b/.github/workflows/reusable-deploy-job.yml @@ -98,5 +98,5 @@ jobs: continue-on-error: true run: | aws cloudfront create-invalidation \ - --distribution-id ${{ inputs.target == 'production' && secrets.AWS_PRODUCTION_FRONTEND_DISTRIBUTION_ID || secrets.AWS_STAGING_FRONTEND_DISTRIBUTION_ID }} \ + --distribution-id ${{ secrets.AWS_FRONTEND_DISTRIBUTION_ID }} \ --paths "/*"