Skip to content

Commit 934a891

Browse files
authored
chore: re-enable testing examples (#2752)
Adds all missing examples and re-enables testing main with them.
1 parent 8874660 commit 934a891

File tree

1 file changed

+104
-35
lines changed

1 file changed

+104
-35
lines changed

.github/workflows/examples.yml

Lines changed: 104 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -19,38 +19,107 @@ jobs:
1919
node-version: lts/*
2020
- uses: ipfs/aegir/actions/cache-node-modules@master
2121

22-
# re-enable after [email protected] release
23-
# test-examples:
24-
# name: Test example ${{ matrix.example.name }}
25-
# runs-on: ubuntu-latest
26-
# needs: build
27-
# continue-on-error: true
28-
# strategy:
29-
# matrix:
30-
# example:
31-
# - name: js-libp2p-example-chat
32-
# repo: https://github.com/libp2p/js-libp2p-example-chat.git
33-
# deps:
34-
# - '@libp2p/tcp@$PWD/packages/transport-tcp'
35-
# - '@libp2p/websockets@$PWD/packages/transport-websockets'
36-
# - 'libp2p@$PWD/packages/libp2p'
37-
# - name: js-libp2p-example-circuit-relay
38-
# repo: https://github.com/libp2p/js-libp2p-example-circuit-relay.git
39-
# deps:
40-
# - '@libp2p/circuit-relay-v2@$PWD/packages/transport-circuit-relay-v2'
41-
# - '@libp2p/identify@$PWD/packages/protocol-identify'
42-
# - '@libp2p/websockets@$PWD/packages/transport-websockets'
43-
# - 'libp2p@$PWD/packages/libp2p'
44-
# - name: js-libp2p-example-connection-encryption
45-
# repo: https://github.com/libp2p/js-libp2p-example-connection-encryption.git
46-
# deps:
47-
# - '@libp2p/plaintext@$PWD/packages/connection-encrypter-plaintext'
48-
# - '@libp2p/tcp@$PWD/packages/transport-tcp'
49-
# - 'libp2p@$PWD/packages/libp2p'
50-
# steps:
51-
# - uses: actions/checkout@v4
52-
# - uses: actions/setup-node@v4
53-
# with:
54-
# node-version: lts/*
55-
# - uses: ipfs/aegir/actions/cache-node-modules@master
56-
# - run: npx xvfb-maybe aegir test-dependant ${{ matrix.example.repo }} --deps ${{ join(matrix.example.deps, ',') }}
22+
test-examples:
23+
name: Test example ${{ matrix.example.name }}
24+
runs-on: ubuntu-latest
25+
needs: build
26+
continue-on-error: true
27+
strategy:
28+
matrix:
29+
example:
30+
- name: js-libp2p-example-browser-pubsub
31+
repo: https://github.com/libp2p/js-libp2p-example-browser-pubsub.git
32+
deps:
33+
- '@libp2p/circuit-relay-v2@$PWD/packages/transport-circuit-relay-v2'
34+
- '@libp2p/dcutr@$PWD/packages/protocol-dcutr'
35+
- '@libp2p/identify@$PWD/packages/protocol-identify'
36+
- '@libp2p/webrtc@$PWD/packages/transport-webrtc'
37+
- '@libp2p/websockets@$PWD/packages/transport-websockets'
38+
- 'libp2p@$PWD/packages/libp2p'
39+
- name: js-libp2p-example-chat
40+
repo: https://github.com/libp2p/js-libp2p-example-chat.git
41+
deps:
42+
- '@libp2p/mdns@$PWD/packages/peer-discovery-mdns'
43+
- '@libp2p/tcp@$PWD/packages/transport-tcp'
44+
- '@libp2p/websockets@$PWD/packages/transport-websockets'
45+
- 'libp2p@$PWD/packages/libp2p'
46+
- name: js-libp2p-example-circuit-relay
47+
repo: https://github.com/libp2p/js-libp2p-example-circuit-relay.git
48+
deps:
49+
- '@libp2p/circuit-relay-v2@$PWD/packages/transport-circuit-relay-v2'
50+
- '@libp2p/identify@$PWD/packages/protocol-identify'
51+
- '@libp2p/websockets@$PWD/packages/transport-websockets'
52+
- 'libp2p@$PWD/packages/libp2p'
53+
- name: js-libp2p-example-connection-encryption
54+
repo: https://github.com/libp2p/js-libp2p-example-connection-encryption.git
55+
deps:
56+
- '@libp2p/plaintext@$PWD/packages/connection-encrypter-plaintext'
57+
- '@libp2p/tcp@$PWD/packages/transport-tcp'
58+
- 'libp2p@$PWD/packages/libp2p'
59+
- name: js-libp2p-example-custom-protocols
60+
repo: https://github.com/libp2p/js-libp2p-example-custom-protocols.git
61+
deps:
62+
- '@libp2p/tcp@$PWD/packages/transport-tcp'
63+
- '@libp2p/websockets@$PWD/packages/transport-websockets'
64+
- 'libp2p@$PWD/packages/libp2p'
65+
- name: js-libp2p-example-delegated-routing
66+
repo: https://github.com/libp2p/js-libp2p-example-delegated-routing.git
67+
deps:
68+
- 'libp2p@$PWD/packages/libp2p'
69+
- name: js-libp2p-example-discovery-mechanisms
70+
repo: https://github.com/libp2p/js-libp2p-example-discovery-mechanisms.git
71+
deps:
72+
- '@libp2p/bootstrap@$PWD/packages/peer-discovery-bootstrap'
73+
- '@libp2p/circuit-relay-v2@$PWD/packages/transport-circuit-relay-v2'
74+
- '@libp2p/identify@$PWD/packages/protocol-identify'
75+
- '@libp2p/kad-dht@$PWD/packages/kad-dht'
76+
- '@libp2p/mdns@$PWD/packages/peer-discovery-mdns'
77+
- '@libp2p/tcp@$PWD/packages/transport-tcp'
78+
- 'libp2p@$PWD/packages/libp2p'
79+
- name: js-libp2p-example-peer-and-content-routing
80+
repo: https://github.com/libp2p/js-libp2p-example-peer-and-content-routing.git
81+
deps:
82+
- '@libp2p/identify@$PWD/packages/protocol-identify'
83+
- '@libp2p/kad-dht@$PWD/packages/kad-dht'
84+
- '@libp2p/tcp@$PWD/packages/transport-tcp'
85+
- 'libp2p@$PWD/packages/libp2p'
86+
- name: js-libp2p-example-pnet
87+
repo: https://github.com/libp2p/js-libp2p-example-pnet.git
88+
deps:
89+
- '@libp2p/pnet@$PWD/packages/pnet'
90+
- '@libp2p/tcp@$PWD/packages/transport-tcp'
91+
- 'libp2p@$PWD/packages/libp2p'
92+
- name: js-libp2p-example-protocol-and-stream-muxing
93+
repo: https://github.com/libp2p/js-libp2p-example-protocol-and-stream-muxing.git
94+
deps:
95+
- '@libp2p/tcp@$PWD/packages/transport-tcp'
96+
- 'libp2p@$PWD/packages/libp2p'
97+
- name: js-libp2p-example-pubsub
98+
repo: https://github.com/libp2p/js-libp2p-example-pubsub.git
99+
deps:
100+
- '@libp2p/identify@$PWD/packages/protocol-identify'
101+
- '@libp2p/tcp@$PWD/packages/transport-tcp'
102+
- 'libp2p@$PWD/packages/libp2p'
103+
- name: js-libp2p-example-transports
104+
repo: https://github.com/libp2p/js-libp2p-example-transports.git
105+
deps:
106+
- '@libp2p/tcp@$PWD/packages/transport-tcp'
107+
- '@libp2p/websockets@$PWD/packages/transport-websockets'
108+
- 'libp2p@$PWD/packages/libp2p'
109+
- name: js-libp2p-example-webrtc-private-to-private
110+
repo: https://github.com/libp2p/js-libp2p-example-webrtc-private-to-private.git
111+
deps:
112+
- '@libp2p/circuit-relay-v2@$PWD/packages/transport-circuit-relay-v2'
113+
- '@libp2p/identify@$PWD/packages/protocol-identify'
114+
- '@libp2p/ping@$PWD/packages/protocol-ping'
115+
- '@libp2p/webrtc@$PWD/packages/transport-webrtc'
116+
- '@libp2p/websockets@$PWD/packages/transport-websockets'
117+
- 'libp2p@$PWD/packages/libp2p'
118+
steps:
119+
- uses: actions/checkout@v4
120+
- uses: actions/setup-node@v4
121+
with:
122+
node-version: lts/*
123+
- uses: ipfs/aegir/actions/cache-node-modules@master
124+
- run: npx playwright install-deps
125+
- run: npx xvfb-maybe aegir test-dependant ${{ matrix.example.repo }} --deps ${{ join(matrix.example.deps, ',') }}

0 commit comments

Comments
 (0)