From 68fb34d4d1084c20ed243fa79474ef788a23e419 Mon Sep 17 00:00:00 2001 From: Daniel Roe Date: Fri, 7 Mar 2025 20:56:48 +0000 Subject: [PATCH] ci: use `environment_url` + update playwright image --- .github/workflows/debug-events.yml | 22 ---------------------- .github/workflows/e2e.yml | 14 +++++++------- package.json | 6 +++--- 3 files changed, 10 insertions(+), 32 deletions(-) delete mode 100644 .github/workflows/debug-events.yml diff --git a/.github/workflows/debug-events.yml b/.github/workflows/debug-events.yml deleted file mode 100644 index deed60fe..00000000 --- a/.github/workflows/debug-events.yml +++ /dev/null @@ -1,22 +0,0 @@ -name: Debug Events - -on: - deployment_status: - -jobs: - debug: - runs-on: ubuntu-latest - steps: - - name: Dump GitHub context - env: - GITHUB_CONTEXT: ${{ toJson(github) }} - run: echo "$GITHUB_CONTEXT" - - - name: Output specific event fields - run: | - echo "Event name: ${{ github.event_name }}" - echo "Deployment state: ${{ github.event.deployment_status.state }}" - echo "Target URL: ${{ github.event.deployment_status.target_url }}" - echo "Environment URL: ${{ github.event.deployment_status.environment_url }}" - echo "Log URL: ${{ github.event.deployment_status.log_url }}" - echo "Environment: ${{ github.event.deployment.environment }}" diff --git a/.github/workflows/e2e.yml b/.github/workflows/e2e.yml index 707d77aa..547d5223 100644 --- a/.github/workflows/e2e.yml +++ b/.github/workflows/e2e.yml @@ -10,18 +10,18 @@ on: deployment_status: concurrency: - group: ${{ github.workflow }}-${{ github.event.inputs.url || github.event.deployment.payload.web_url || github.event.deployment_status.target_url || github.event.deployment_status.environment_url }} + group: ${{ github.workflow }}-${{ github.event.inputs.url || github.event.deployment.payload.web_url || github.event.deployment_status.environment_url }} cancel-in-progress: true jobs: playwright: environment: name: ${{ github.event.deployment.environment || 'Production' }} - url: ${{ github.event.inputs.url || github.event.deployment.payload.web_url || github.event.deployment_status.target_url || github.event.deployment_status.environment_url }} + url: ${{ github.event.inputs.url || github.event.deployment.payload.web_url || github.event.deployment_status.environment_url }} if: github.event.deployment_status.state == 'success' || github.event_name == 'workflow_dispatch' runs-on: ubuntu-latest container: - image: mcr.microsoft.com/playwright:v1.49.0-focal + image: mcr.microsoft.com/playwright:v1.51.0-noble steps: - uses: actions/checkout@v4 @@ -39,21 +39,21 @@ jobs: - run: pnpm test:e2e env: - BASE_URL: ${{ github.event.inputs.url || github.event.deployment.payload.web_url || github.event.deployment_status.target_url || github.event.deployment_status.environment_url }} + BASE_URL: ${{ github.event.inputs.url || github.event.deployment.payload.web_url || github.event.deployment_status.environment_url }} lighthouse: environment: name: ${{ github.event.deployment.environment || 'Production' }} - url: ${{ github.event.inputs.url || github.event.deployment.payload.web_url || github.event.deployment_status.target_url || github.event.deployment_status.environment_url }} + url: ${{ github.event.inputs.url || github.event.deployment.payload.web_url || github.event.deployment_status.environment_url }} if: github.event.deployment_status.state == 'success' || github.event_name == 'workflow_dispatch' runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - - run: curl ${{ github.event.inputs.url || github.event.deployment.payload.web_url || github.event.deployment_status.target_url || github.event.deployment_status.environment_url }} + - run: curl ${{ github.event.inputs.url || github.event.deployment.payload.web_url || github.event.deployment_status.environment_url }} - name: Audit URLs using Lighthouse uses: treosh/lighthouse-ci-action@v12 with: - urls: ${{ github.event.inputs.url || github.event.deployment.payload.web_url || github.event.deployment_status.target_url || github.event.deployment_status.environment_url }} + urls: ${{ github.event.inputs.url || github.event.deployment.payload.web_url || github.event.deployment_status.environment_url }} uploadArtifacts: true temporaryPublicStorage: true budgetPath: ./budget.json diff --git a/package.json b/package.json index d52c403c..fc3488c4 100644 --- a/package.json +++ b/package.json @@ -14,7 +14,7 @@ "test": "vitest run test/unit/behaviour && vitest run test/unit/bundle && vitest run test/nuxt --config vitest.nuxt.config.mts", "test:types": "nuxi prepare && vue-tsc --noEmit", "test:e2e": "playwright test test/e2e", - "test:e2e:update": "docker run --rm --network host -v $(pwd):/work/ -w /work/ -it mcr.microsoft.com/playwright:v1.49.0-focal npx playwright test test/e2e --update-snapshots", + "test:e2e:update": "docker run --rm --network host -v $(pwd):/work/ -w /work/ -it mcr.microsoft.com/playwright:v1.51.0-noble npx playwright test test/e2e --update-snapshots", "postinstall": "nuxt prepare && pnpm simple-git-hooks install" }, "lint-staged": { @@ -77,13 +77,13 @@ "@commitlint/cli": "19.7.1", "@commitlint/config-conventional": "19.7.1", "@nuxt/test-utils": "3.17.1", - "@playwright/test": "1.50.1", + "@playwright/test": "1.51.0", "@vue/test-utils": "2.4.6", "eslint": "9.21.0", "happy-dom": "17.1.8", "lint-staged": "15.4.3", "ofetch": "1.4.1", - "playwright-core": "1.50.1", + "playwright-core": "1.51.0", "rollup": "4.34.9", "simple-git-hooks": "2.11.1", "stylelint": "16.15.0", -- knotmirror 0.0.1