Skip to content

It's alive (#965) #1992

It's alive (#965)

It's alive (#965) #1992

Workflow file for this run

name: Tests
env:
CI: true
on:
push:
branches: [canary]
paths:
- 'apps/cache-testing/**'
- 'packages/cache-handler/**'
- 'internal/next-common/**'
- 'internal/next-lru-cache/**'
- 'server/**'
- '.github/workflows/tests.yml'
- 'internal/eslint-config/**'
- 'package.json'
- 'biome.json'
- 'turbo.json'
- 'prettier.config.js'
pull_request:
branches: [canary]
types: [opened, synchronize]
paths:
- 'apps/cache-testing/**'
- 'packages/cache-handler/**'
- 'internal/next-common/**'
- 'internal/next-lru-cache/**'
- 'server/**'
- '.github/workflows/tests.yml'
- 'internal/eslint-config/**'
- 'package.json'
- 'biome.json'
- 'turbo.json'
- 'prettier.config.js'
jobs:
test:
strategy:
max-parallel: 2
matrix:
handler: [redis-stack, redis-strings]
name: ${{ matrix.handler }}
timeout-minutes: 10
runs-on: ubuntu-latest
env:
REDIS_URL: redis://localhost:6379
services:
redis:
image: redis/redis-stack-server:latest
options: >-
--health-cmd "redis-cli ping"
--health-interval 10s
--health-timeout 5s
--health-retries 5
ports:
- 6379:6379
steps:
- name: Checkout
uses: actions/checkout@v4
- uses: pnpm/action-setup@v4
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version-file: '.node-version'
check-latest: true
cache: 'pnpm'
- name: Replace Path with Sed
run: |
if [ "${{ matrix.handler }}" == "redis-strings" ]; then
sed -i 's/cache-handler-redis-stack/cache-handler-redis-strings/g' apps/cache-testing/next.config.mjs
sed -i 's/cache-handler-redis-stack/cache-handler-redis-strings/g' apps/cache-testing/src/instrumentation.ts
fi
- name: Install dependencies
run: pnpm i --frozen-lockfile
- name: Install Playwright Browsers
run: pnpm -F @repo/cache-testing playwright:install
- name: Build packages
run: pnpm build:packages
- name: Check code style
run: pnpm codestyle:check
- name: Run unit tests
run: pnpm test
- name: Run e2e tests
run: |
pnpm start:backend &
pnpm build:test-app
pnpm e2e
- uses: actions/upload-artifact@v4
if: always()
with:
name: playwright-report-${{ matrix.handler }}
path: apps/cache-testing/playwright-report/
retention-days: 7