Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 8 additions & 9 deletions .github/workflows/tests.yml → .github/workflows/tests-e2e.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Tests
name: Tests - E2E

on:
push:
Expand All @@ -7,7 +7,7 @@ on:
branches: [main]

jobs:
test:
e2e:
runs-on: ubuntu-latest

steps:
Expand Down Expand Up @@ -37,16 +37,15 @@ jobs:
- name: Install Playwright browsers
run: npx playwright install chromium

- name: Run tests
run: yarn test:ci

- name: Build
run: yarn build
- name: Run e2e tests
env:
VITE_USE_LOCAL_RELAY: "true"
run: yarn playwright test --reporter=list

- name: Upload test results
uses: actions/upload-artifact@v4
if: always()
if: ${{ always() && hashFiles('playwright-report/**') != '' }}
with:
name: playwright-report
name: playwright-report-e2e
path: playwright-report/
retention-days: 30
51 changes: 51 additions & 0 deletions .github/workflows/tests-ndk.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
name: Tests - NDK

on:
push:
branches: [main]
pull_request:
branches: [main]

jobs:
ndk:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4

- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: "22"
cache: "yarn"

- name: Install dependencies
run: yarn install --frozen-lockfile

- name: Cache wellorder dataset
uses: actions/cache@v4
with:
path: dev-relay/nostr-wellorder-early-500k-v1.jsonl.bz2
key: wellorder-dataset-v1

- name: Start local relay with Docker
run: (cd dev-relay && docker compose up -d --wait --wait-timeout 60)

- name: Seed relay with test data
run: (cd dev-relay && bash quick-seed.sh 80000)

- name: Install Playwright browsers
run: npx playwright install chromium

- name: Run NDK tests
env:
VITE_USE_LOCAL_RELAY: "true"
run: yarn playwright test tests/webrtc-blossom-ndk.spec.ts --reporter=list

- name: Upload test results
uses: actions/upload-artifact@v4
if: ${{ always() && hashFiles('playwright-report/**') != '' }}
with:
name: playwright-report-ndk
path: playwright-report/
retention-days: 30
29 changes: 29 additions & 0 deletions .github/workflows/tests-unit.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: Tests - Unit

on:
push:
branches: [main]
pull_request:
branches: [main]

jobs:
unit:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4

- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: "22"
cache: "yarn"

- name: Install dependencies
run: yarn install --frozen-lockfile

- name: Run unit tests
run: yarn test:unit

- name: Build
run: yarn build
Loading