Skip to content

Nightly E2E

Nightly E2E #60

Workflow file for this run

name: Nightly E2E
# Runs kinora's own e2e suites daily and uploads results + traces to the kinora cloud
on:
schedule:
- cron: '0 6 * * *'
workflow_dispatch:
permissions:
contents: read
env:
VITE_KINORA_SERVER_URL: http://localhost:3399
jobs:
e2e_upload:
runs-on: ubuntu-latest
timeout-minutes: 20
services:
postgres:
image: postgres:18.1
env:
POSTGRES_USER: kinora
POSTGRES_PASSWORD: kinora
POSTGRES_DB: kinora
ports:
- 5436:5432
options: >-
--health-cmd "pg_isready -U kinora"
--health-interval 5s --health-timeout 5s --health-retries 10
env:
NODE_ENV: development
PORT: '3399'
BASE_URL: http://localhost:3399
WEB_ORIGIN: http://localhost:5399
AUTH_SECRET: ci-e2e-secret-not-used-for-anything-real
POSTGRES_USER: kinora
POSTGRES_PASSWORD: kinora
POSTGRES_HOST: localhost
POSTGRES_PORT: '5436'
POSTGRES_DB: kinora_e2e
STORAGE_DIR: .data/artifacts
GOOGLE_CLIENT_ID: ''
GOOGLE_CLIENT_SECRET: ''
GITHUB_CLIENT_ID: ''
GITHUB_CLIENT_SECRET: ''
KINORA_CLOUD: 'false'
KINORA_TOKEN: ${{ secrets.KINORA_TOKEN }}
steps:
- uses: actions/checkout@d23441a48e516b6c34aea4fa41551a30e30af803 # v6
- uses: pnpm/action-setup@0977fd99725f1db4007ccb2928dbb4e90d06cc86 # v6
- uses: actions/setup-node@249970729cb0ef3589644e2896645e5dc5ba9c38 # v6
with:
node-version-file: package.json
cache: pnpm
- run: pnpm install --frozen-lockfile
- name: Cache Playwright browsers
id: playwright-cache
uses: actions/cache@2c8a9bd7457de244a408f35966fab2fb45fda9c8 # v6.0.0
with:
path: ~/.cache/ms-playwright
key: ${{ runner.os }}-playwright-${{ hashFiles('pnpm-lock.yaml') }}
# On a cache hit the browser binary is restored; OS deps live system-wide and aren't cached.
- name: Install Playwright browser
if: steps.playwright-cache.outputs.cache-hit != 'true'
run: pnpm --filter @kinora/web exec playwright install --with-deps chromium
- name: Install Playwright OS deps
if: steps.playwright-cache.outputs.cache-hit == 'true'
run: pnpm --filter @kinora/web exec playwright install-deps chromium
# Run each suite with the json reporter, then upload via the *published* CLI (npx)
- name: E2E + upload to kinora cloud
continue-on-error: true
run: |
pnpm --filter @kinora/server db:reset:e2e
PLAYWRIGHT_JSON_OUTPUT_NAME="$RUNNER_TEMP/web.json" pnpm --filter @kinora/web exec playwright test --reporter=json || true
npx --yes @kinora/cli@latest upload "$RUNNER_TEMP/web.json" --project kinora-web-e2e --name "Kinora Web E2E"
PLAYWRIGHT_JSON_OUTPUT_NAME="$RUNNER_TEMP/viewer.json" pnpm --filter @kinora/trace-viewer exec playwright test --reporter=json || true
npx --yes @kinora/cli@latest upload "$RUNNER_TEMP/viewer.json" --project kinora-viewer-e2e --name "Kinora Trace Viewer E2E"