Skip to content

feat: add transports example (#178) #168

feat: add transports example (#178)

feat: add transports example (#178) #168

Workflow file for this run

name: CI
on:
push:
branches:
- main
pull_request:
branches:
- '**'
concurrency:
group: ${{ github.head_ref || github.ref_name }}
cancel-in-progress: true
jobs:
examples:
runs-on: ubuntu-latest
name: Test ${{ matrix.project }}
strategy:
fail-fast: false
matrix:
project:
- js-libp2p-example-browser-pubsub
- js-libp2p-example-chat
- js-libp2p-example-circuit-relay
- js-libp2p-example-connection-encryption
- js-libp2p-example-custom-protocols
- js-libp2p-example-delegated-routing
- js-libp2p-example-discovery-mechanisms
- js-libp2p-example-peer-and-content-routing
- js-libp2p-example-pnet
- js-libp2p-example-protocol-and-stream-muxing
- js-libp2p-example-pubsub
- js-libp2p-example-transports
- js-libp2p-example-webrtc-private-to-private
defaults:
run:
working-directory: examples/${{ matrix.project }}
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: lts/*
- name: Install dependencies
run: npm install
- name: Install Playwright
run: npx -y playwright install --with-deps
- name: Run tests
run: npm run test
env:
CI: true
monorepo:
runs-on: ubuntu-latest
name: Test monorepo
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: lts/*
- name: Install dependencies
run: npm install
- name: Install Playwright
run: npx -y playwright install --with-deps
- name: Run linting
run: npm run lint
env:
CI: true
- name: Run tests
run: npm run test
env:
CI: true
push-changes:
name: Push changes
runs-on: ubuntu-latest
needs: [monorepo, examples]
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
strategy:
fail-fast: true
matrix:
project:
- js-libp2p-example-browser-pubsub
- js-libp2p-example-chat
- js-libp2p-example-circuit-relay
- js-libp2p-example-connection-encryption
- js-libp2p-example-custom-protocols
- js-libp2p-example-delegated-routing
- js-libp2p-example-discovery-mechanisms
- js-libp2p-example-peer-and-content-routing
- js-libp2p-example-pnet
- js-libp2p-example-protocol-and-stream-muxing
- js-libp2p-example-pubsub
- js-libp2p-example-transports
- js-libp2p-example-webrtc-private-to-private
steps:
- uses: convictional/trigger-workflow-and-wait@f69fa9eedd3c62a599220f4d5745230e237904be
with:
owner: libp2p
repo: ${{ matrix.project }}
github_token: ${{ secrets.REPO_PULL_TOKEN }}
workflow_file_name: sync.yml