From 265a8df7d60ed512c54f1a8beb72ef708209230a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kacper=20Kapu=C5=9Bciak?= Date: Mon, 9 Nov 2026 10:50:26 +0100 Subject: [PATCH] ci: prototype e2e workflow --- .github/workflows/e2e.yml | 49 +++++++++++++++++++++++++++++++++++++++ .gitignore | 2 ++ 2 files changed, 51 insertions(+) create mode 100644 .github/workflows/e2e.yml diff --git a/.github/workflows/e2e.yml b/.github/workflows/e2e.yml new file mode 100644 index 0000000..f54879f --- /dev/null +++ b/.github/workflows/e2e.yml @@ -0,0 +1,49 @@ +name: e2e + +on: + pull_request: + push: + branches: [main] + +permissions: + contents: read + +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: ${{ github.event_name == 'pull_request' }} + +jobs: + e2e: + runs-on: ubuntu-latest + timeout-minutes: 30 + steps: + - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 + - uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0 + with: + node-version: 24 + cache: npm + - run: npm ci + - uses: actions/cache@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0 + with: + path: ~/.cache/ms-playwright + key: playwright-${{ runner.os }}-${{ runner.arch }}-${{ hashFiles('package-lock.json') }} + + - name: Install browsers + run: npx e2e-web install chromium --with-deps + + - name: Run e2e + run: npx e2e run --reporter list,junit + env: + AI_GATEWAY_API_KEY: ${{ secrets.AI_GATEWAY_API_KEY }} + + - name: Upload report + if: ${{ !cancelled() }} + uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 + with: + name: e2e-report + path: | + .e2e/report.json + .e2e/junit.xml + .e2e/results + if-no-files-found: warn + retention-days: 7 diff --git a/.gitignore b/.gitignore index a4e4dc0..8c6c623 100644 --- a/.gitignore +++ b/.gitignore @@ -12,3 +12,5 @@ next-env.d.ts .e2e/summary.md .e2e/logs/ .e2e/videos/ + +.env