mirror of
https://github.com/vrtmrz/obsidian-livesync.git
synced 2026-10-22 17:13:20 +00:00
91 lines
2.6 KiB
YAML
91 lines
2.6 KiB
YAML
name: CLI P2P Compose tests
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- main
|
|
- beta
|
|
paths:
|
|
- '.github/workflows/cli-p2p-tests.yml'
|
|
- 'src/apps/cli/**'
|
|
- '!src/apps/cli/**/*.md'
|
|
- 'src/LiveSyncBaseCore.ts'
|
|
- 'src/common/**'
|
|
- 'src/serviceFeatures/**'
|
|
- 'src/serviceModules/**'
|
|
- 'src/integrations/**'
|
|
- 'src/modules/AbstractModule.ts'
|
|
- 'src/modules/main/**'
|
|
- 'src/modules/coreFeatures/**'
|
|
- 'manifest.json'
|
|
- 'tsconfig.json'
|
|
- 'package.json'
|
|
- 'package-lock.json'
|
|
- '.dockerignore'
|
|
- 'test/bench-network/**'
|
|
pull_request:
|
|
types: [opened, synchronize, reopened, ready_for_review]
|
|
paths:
|
|
- '.github/workflows/cli-p2p-tests.yml'
|
|
- 'src/apps/cli/**'
|
|
- '!src/apps/cli/**/*.md'
|
|
- 'src/LiveSyncBaseCore.ts'
|
|
- 'src/common/**'
|
|
- 'src/serviceFeatures/**'
|
|
- 'src/serviceModules/**'
|
|
- 'src/integrations/**'
|
|
- 'src/modules/AbstractModule.ts'
|
|
- 'src/modules/main/**'
|
|
- 'src/modules/coreFeatures/**'
|
|
- 'manifest.json'
|
|
- 'tsconfig.json'
|
|
- 'package.json'
|
|
- 'package-lock.json'
|
|
- '.dockerignore'
|
|
- 'test/bench-network/**'
|
|
workflow_dispatch:
|
|
|
|
permissions:
|
|
contents: read
|
|
|
|
concurrency:
|
|
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
|
|
cancel-in-progress: true
|
|
|
|
jobs:
|
|
compose-p2p-e2e:
|
|
if: ${{ github.event_name != 'pull_request' || !github.event.pull_request.draft }}
|
|
runs-on: ubuntu-latest
|
|
timeout-minutes: 45
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v5
|
|
|
|
- name: Show Docker versions
|
|
run: |
|
|
docker --version
|
|
docker compose version
|
|
|
|
- name: Run Compose CLI P2P E2E
|
|
env:
|
|
CLI_E2E_TASK: test:p2p:ci
|
|
RELAY: ws://nostr-relay:7777/
|
|
PEERS_TIMEOUT: '20'
|
|
SYNC_TIMEOUT: '60'
|
|
LIVESYNC_USE_COTURN: '0'
|
|
TURN_SERVERS: none
|
|
LIVESYNC_P2P_PEERS_RETRY: '1'
|
|
LIVESYNC_P2P_RELAY_READY_TIMEOUT_MS: '60000'
|
|
BENCH_LIVESYNC_TEST_TEE: '0'
|
|
run: docker compose -f test/bench-network/compose.yml run --build --rm bench-runner run-livesync-cli-e2e
|
|
|
|
- name: Show Compose diagnostics
|
|
if: failure()
|
|
run: |
|
|
docker compose -f test/bench-network/compose.yml ps
|
|
docker compose -f test/bench-network/compose.yml logs --no-color couchdb nostr-relay || true
|
|
|
|
- name: Stop Compose services
|
|
if: always()
|
|
run: docker compose -f test/bench-network/compose.yml down -v --remove-orphans
|