mirror of
https://github.com/BradNut/personal-website-sveltekit
synced 2025-09-08 23:20:18 +00:00
65 lines
2.1 KiB
YAML
65 lines
2.1 KiB
YAML
name: Run_Svelte_Integration_on_PRs
|
|
|
|
on:
|
|
push:
|
|
branches: [ main, master ]
|
|
pull_request:
|
|
branches: [ main, master ]
|
|
|
|
|
|
workflow_dispatch:
|
|
|
|
env:
|
|
WALLABAG_MAX_ARTICLES: ${{ secrets.WALLABAG_MAX_ARTICLES }}
|
|
WALLABAG_MAX_PAGES: ${{ secrets.WALLABAG_MAX_PAGES }}
|
|
WALLABAG_CLIENT_ID: ${{ secrets.WALLABAG_CLIENT_ID }}
|
|
WALLABAG_CLIENT_SECRET: ${{ secrets.WALLABAG_CLIENT_SECRET }}
|
|
WALLABAG_USERNAME: ${{ secrets.WALLABAG_USERNAME }}
|
|
WALLABAG_PASSWORD: ${{ secrets.WALLABAG_PASSWORD }}
|
|
WALLABAG_URL: ${{ secrets.WALLABAG_URL }}
|
|
BANDCAMP_USERNAME: ${{ secrets.BANDCAMP_USERNAME }}
|
|
PUBLIC_SITE_URL: ${{ secrets.PUBLIC_SITE_URL }}
|
|
PUBLIC_URL: ${{ secrets.PUBLIC_URL }}
|
|
PUBLIC_UMAMI_DO_NOT_TRACK: ${{ secrets.PUBLIC_UMAMI_DO_NOT_TRACK }}
|
|
PUBLIC_UMAMI_URL: ${{ secrets.PUBLIC_UMAMI_URL }}
|
|
PUBLIC_UMAMI_ID: ${{ secrets.PUBLIC_UMAMI_ID }}
|
|
PAGE_SIZE: ${{ secrets.PAGE_SIZE }}
|
|
USE_REDIS_CACHE: ${{ secrets.USE_REDIS_CACHE }}
|
|
REDIS_URI: ${{ secrets.REDIS_URI }}
|
|
# Disable Redis during E2E to avoid network/DNS failures in CI preview server
|
|
# This overrides secrets above for this workflow job context
|
|
# (If you later need Redis in E2E, remove this override.)
|
|
E2E_USE_REDIS_CACHE: 'false'
|
|
|
|
jobs:
|
|
e2e-tests:
|
|
name: Run end-to-end tests
|
|
timeout-minutes: 60
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Checkout code
|
|
uses: actions/checkout@v4
|
|
- name: pnpm-setup
|
|
uses: pnpm/action-setup@v4
|
|
with:
|
|
version: 10
|
|
- name: Set up Node.js
|
|
uses: actions/setup-node@v4
|
|
with:
|
|
node-version: 22.x
|
|
cache: 'pnpm'
|
|
- name: Install dependencies
|
|
run: pnpm install
|
|
- name: Install playwright browsers
|
|
run: pnpm exec playwright install --with-deps
|
|
- name: Run tests
|
|
env:
|
|
# Force Redis off during E2E regardless of repo secrets
|
|
USE_REDIS_CACHE: ${{ env.E2E_USE_REDIS_CACHE }}
|
|
run: pnpm test:integration
|
|
- uses: actions/upload-artifact@v4
|
|
if: ${{ !cancelled() }}
|
|
with:
|
|
name: playwright-report
|
|
path: playwright-report/
|
|
retention-days: 30
|