-
Notifications
You must be signed in to change notification settings - Fork 7
159 lines (131 loc) · 4.69 KB
/
CI.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
# CI for the src folder
name: CI
on:
pull_request:
branches:
- master
paths:
- "test/**"
- "src/**"
- "rpc/**"
- "config/**"
- "package.json"
- "package-lock.json"
push:
branches:
- master
paths:
- "test/**"
- "src/**"
- "rpc/**"
- "config/**"
- ".github/**"
- "package.json"
- "package-lock.json"
jobs:
test-plebbit-js-node-local:
runs-on: ubuntu-latest
timeout-minutes: 20
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 18
cache: "npm"
- run: npm ci
- run: npm run build
# disable hosts we shouldn't use
- run: sudo echo "255.255.255.255 cloudflare-ipfs.com" | sudo tee -a /etc/hosts
- run: sudo echo "255.255.255.255 pubsubprovider.xyz" | sudo tee -a /etc/hosts
- run: DEBUG="plebbit*" npm run test:server:node |& tee test_server.log & npm run test:server:wait-on
- name: Run mocked challenge tests
run: npm run test:mocked:challenges
- run: DEBUG="plebbit*, -plebbit*trace" npm run test:node:parallel:local
- run: cat test_server.log
if: ${{ !cancelled() }}
test-plebbit-js-node-remote:
runs-on: ubuntu-latest
timeout-minutes: 20
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 18
cache: "npm"
- run: npm ci
- run: npm run build
# disable hosts we shouldn't use
- run: sudo echo "255.255.255.255 cloudflare-ipfs.com" | sudo tee -a /etc/hosts
- run: sudo echo "255.255.255.255 pubsubprovider.xyz" | sudo tee -a /etc/hosts
- run: DEBUG="plebbit*" npm run test:server:node |& tee test_server.log & npm run test:server:wait-on
- run: DEBUG="plebbit*, -plebbit*trace" npm run test:node:remote
- run: cat test_server.log
if: ${{ !cancelled() }}
test-plebbit-js-chrome-remote:
runs-on: ubuntu-latest
timeout-minutes: 20
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 18
cache: "npm"
- run: npm ci
- run: npm run build
- run: npm run webpack
# disable hosts we shouldn't use
- run: sudo echo "255.255.255.255 cloudflare-ipfs.com" | sudo tee -a /etc/hosts
- run: sudo echo "255.255.255.255 pubsubprovider.xyz" | sudo tee -a /etc/hosts
- run: DEBUG="plebbit*" npm run test:server:node |& tee test_server.log & npm run test:server:wait-on
- name: Link chrome executable
run: sudo ln -s /usr/bin/google-chrome-stable /usr/bin/chrome
- run: DEBUG="plebbit*, -plebbit*trace" npm run test:browser:chrome
- run: cat test_server.log
if: ${{ !cancelled() }}
test-plebbit-js-firefox-remote:
runs-on: ubuntu-latest
timeout-minutes: 20
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 18
cache: "npm"
- run: npm ci
- run: npm run build
- run: npm run webpack
# disable hosts we shouldn't use
- run: sudo echo "255.255.255.255 cloudflare-ipfs.com" | sudo tee -a /etc/hosts
- run: sudo echo "255.255.255.255 pubsubprovider.xyz" | sudo tee -a /etc/hosts
- run: DEBUG="plebbit*" npm run test:server:node |& tee test_server.log & npm run test:server:wait-on
- run: DEBUG="plebbit*, -plebbit*trace" npm run test:browser:firefox
- run: cat test_server.log
if: ${{ !cancelled() }}
test-plebbit-rpc:
runs-on: ubuntu-latest
timeout-minutes: 20
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 18
cache: "npm"
# Setup plebbit-js deps
- run: npm ci
- run: npm run build
- run: npm run webpack
# disable hosts we shouldn't use
- run: sudo echo "255.255.255.255 cloudflare-ipfs.com" | sudo tee -a /etc/hosts
- run: sudo echo "255.255.255.255 pubsubprovider.xyz" | sudo tee -a /etc/hosts
# Setup tests for plebbit-js using rpc here
- run: USE_RPC=1 CLIENT="node:rpc" DEBUG="plebbit*" npm run test:server:node |& tee test_server.log & npm run test:server:wait-on
- run: DEBUG="plebbit*, -plebbit*trace" npm run test:node:rpc
- run: cat test_server.log
if: ${{ !cancelled() }}
# Setup tests for rpc directory here (skipped for now)
test-plebbit-react-hooks:
uses: ./.github/workflows/CI-plebbit-react-hooks.yml
secrets: inherit
test-plebbit-protocol-test:
uses: ./.github/workflows/CI-plebbit-protocol-test.yml
secrets: inherit