chore: kubo in .circleci/main.yml
Marcin Rataj committed
Jul 6, 2022 at 21:04 UTC
c9b8fbdbefa93512f2876e4abe929e53726ee417
1 file changed
+31
-31
.circleci/main.yml
+31
-31
@@ -14,13 +14,13 @@ aliases:
14
restore_gomod: &restore_gomod
15
restore_cache:
16
keys:
17
- - v5-dep-{{ .Branch }}-{{ checksum "~/ipfs/go-ipfs/go.sum" }}-{{ .Environment.CIRCLE_JOB }}
18
- - v5-dep-{{ .Branch }}-{{ checksum "~/ipfs/go-ipfs/go.sum" }}-
17
+ - v5-dep-{{ .Branch }}-{{ checksum "~/ipfs/kubo/go.sum" }}-{{ .Environment.CIRCLE_JOB }}
18
+ - v5-dep-{{ .Branch }}-{{ checksum "~/ipfs/kubo/go.sum" }}-
19
- v5-dep-{{ .Branch }}-
20
- v5-dep-master-
21
store_gomod: &store_gomod
22
save_cache:
23
- key: v5-dep-{{ .Branch }}-{{ checksum "~/ipfs/go-ipfs/go.sum" }}-{{ .Environment.CIRCLE_JOB }}
23
+ key: v5-dep-{{ .Branch }}-{{ checksum "~/ipfs/kubo/go.sum" }}-{{ .Environment.CIRCLE_JOB }}
24
paths:
25
- ~/go/pkg/mod
26
- ~/.cache/go-build/
@@ -38,7 +38,7 @@ executors:
38
golang:
39
docker:
40
- image: cimg/go:1.18.3
41
- working_directory: ~/ipfs/go-ipfs
41
+ working_directory: ~/ipfs/kubo
42
environment:
43
<<: *default_environment
44
TEST_NO_DOCKER: 1
@@ -47,13 +47,13 @@ executors:
47
node:
48
docker:
49
- image: circleci/node:14
50
- working_directory: ~/ipfs/go-ipfs
50
+ working_directory: ~/ipfs/kubo
51
environment:
52
<<: *default_environment
53
node-browsers:
54
docker:
55
- image: circleci/node:14-browsers
56
- working_directory: ~/ipfs/go-ipfs
56
+ working_directory: ~/ipfs/kubo
57
environment:
58
<<: *default_environment
59
NO_SANDBOX: true
@@ -64,7 +64,7 @@ executors:
64
docker:
65
- image: cimg/go:1.18.3
66
environment:
67
- IMAGE_NAME: ipfs/go-ipfs
67
+ IMAGE_NAME: ipfs/kubo
68
WIP_IMAGE_TAG: wip
69
70
jobs:
@@ -108,21 +108,21 @@ jobs:
108
command: bash <(curl -s https://codecov.io/bash) -cF unittests -X search -f coverage/unit_tests.coverprofile
109
- run:
110
command: |
111
- # we want to first test with the go-ipfs in the go.mod file
111
+ # we want to first test with the kubo version in the go.mod file
112
go test -v ./...
113
114
- # we also want to test the examples against the current version of go-ipfs
114
+ # we also want to test the examples against the current version of kubo
115
# however, that version might be in a fork so we need to replace the dependency
116
117
# backup the go.mod and go.sum files to restore them after we run the tests
118
cp go.mod go.mod.bak
119
cp go.sum go.sum.bak
120
121
- # make sure the examples run against the current version of go-ipfs
121
+ # make sure the examples run against the current version of kubo
122
go mod edit -replace github.com/ipfs/kubo=./../../..
123
go mod tidy
124
125
- # use the internal config package when we test the current version of go-ipfs
125
+ # use the internal config package when we test the current version of kubo
126
sed -i.bak 's;"github.com/ipfs/go-ipfs-config";"github.com/ipfs/kubo/config";' ./main.go
127
128
go test -v ./...
@@ -133,7 +133,7 @@ jobs:
133
134
# restore the main.go to its original state
135
mv main.go.bak main.go
136
- working_directory: ~/ipfs/go-ipfs/docs/examples/go-ipfs-as-a-library
136
+ working_directory: ~/ipfs/kubo/docs/examples/go-ipfs-as-a-library
137
138
- run:
139
when: always
@@ -152,7 +152,7 @@ jobs:
152
machine:
153
image: ubuntu-2004:202010-01
154
resource_class: << pipeline.parameters.resource_class >>
155
- working_directory: ~/ipfs/go-ipfs
155
+ working_directory: ~/ipfs/kubo
156
environment:
157
<<: *default_environment
158
TEST_NO_DOCKER: 0
@@ -248,14 +248,14 @@ jobs:
248
npm install ipfs@^0.61.0
249
npm install ipfs-interop@^8.0.10
250
npm install mocha-circleci-reporter@0.0.3
251
- working_directory: ~/ipfs/go-ipfs/interop
251
+ working_directory: ~/ipfs/kubo/interop
252
- run:
253
name: Running tests
254
command: |
255
mkdir -p /tmp/test-results/interop/
256
export MOCHA_FILE="$(mktemp /tmp/test-results/interop/unit.XXXXXX.xml)"
257
npx ipfs-interop -- -t node -f $(sed -n -e "s|^import '\(.*\)'$|test/\1|p" node_modules/ipfs-interop/test/node.js | circleci tests split --split-by=timings) -- --reporter mocha-circleci-reporter
258
- working_directory: ~/ipfs/go-ipfs/interop
258
+ working_directory: ~/ipfs/kubo/interop
259
environment:
260
LIBP2P_TCP_REUSEPORT: false
261
LIBP2P_ALLOW_WEAK_RSA_KEYS: 1
@@ -265,7 +265,7 @@ jobs:
265
- save_cache:
266
key: v1-interop-{{ .Branch }}-{{ .Revision }}
267
paths:
268
- - ~/ipfs/go-ipfs/interop/node_modules
268
+ - ~/ipfs/kubo/interop/node_modules
269
go-ipfs-api:
270
executor: golang
271
steps:
@@ -290,13 +290,13 @@ jobs:
290
done
291
- restore_cache:
292
keys:
293
- - v1-go-api-{{ checksum "~/ipfs/go-ipfs/go-ipfs-api/go.sum" }}
293
+ - v1-go-api-{{ checksum "~/ipfs/kubo/go-ipfs-api/go.sum" }}
294
- v1-go-api-
295
- run:
296
command: go test -count=1 -v ./...
297
- working_directory: ~/ipfs/go-ipfs/go-ipfs-api
297
+ working_directory: ~/ipfs/kubo/go-ipfs-api
298
- save_cache:
299
- key: v1-go-api-{{ checksum "~/ipfs/go-ipfs/go-ipfs-api/go.sum" }}
299
+ key: v1-go-api-{{ checksum "~/ipfs/kubo/go-ipfs-api/go.sum" }}
300
paths:
301
- ~/go/pkg/mod
302
- ~/.cache/go-build/
@@ -316,16 +316,16 @@ jobs:
316
git -C go-ipfs-http-client log -1
317
- restore_cache:
318
keys:
319
- - v1-http-client-{{ checksum "~/ipfs/go-ipfs/go-ipfs-http-client/go.sum" }}
319
+ - v1-http-client-{{ checksum "~/ipfs/kubo/go-ipfs-http-client/go.sum" }}
320
- v1-http-client-
321
- run:
322
name: go test -count=1 -v ./...
323
command: |
324
export PATH=/tmp/circleci-workspace/bin:$PATH
325
go test -count=1 -v ./...
326
- working_directory: ~/ipfs/go-ipfs/go-ipfs-http-client
326
+ working_directory: ~/ipfs/kubo/go-ipfs-http-client
327
- save_cache:
328
- key: v1-http-client-{{ checksum "~/ipfs/go-ipfs/go-ipfs-http-client/go.sum" }}
328
+ key: v1-http-client-{{ checksum "~/ipfs/kubo/go-ipfs-http-client/go.sum" }}
329
paths:
330
- ~/go/pkg/mod
331
- ~/.cache/go-build/
@@ -338,36 +338,36 @@ jobs:
338
- run:
339
name: Cloning
340
command: |
341
- git clone https://github.com/ipfs-shipyard/ipfs-webui.git
341
+ git clone https://github.com/ipfs/ipfs-webui.git
342
git -C ipfs-webui log -1
343
- restore_cache:
344
keys:
345
- - v1-ipfs-webui-{{ checksum "~/ipfs/go-ipfs/ipfs-webui/package-lock.json" }}
345
+ - v1-ipfs-webui-{{ checksum "~/ipfs/kubo/ipfs-webui/package-lock.json" }}
346
- v1-ipfs-webui-
347
- run:
348
name: Installing dependencies
349
command: |
350
npm install
351
npx playwright install
352
- working_directory: ~/ipfs/go-ipfs/ipfs-webui
352
+ working_directory: ~/ipfs/kubo/ipfs-webui
353
- run:
354
name: Running upstream tests (finish early if they fail)
355
command: |
356
npm test || circleci-agent step halt
357
- working_directory: ~/ipfs/go-ipfs/ipfs-webui
357
+ working_directory: ~/ipfs/kubo/ipfs-webui
358
- run:
359
- name: Running tests with go-ipfs built from current commit
359
+ name: Running tests with kubo built from current commit
360
command: npm test
361
- working_directory: ~/ipfs/go-ipfs/ipfs-webui
361
+ working_directory: ~/ipfs/kubo/ipfs-webui
362
environment:
363
IPFS_GO_EXEC: /tmp/circleci-workspace/bin/ipfs
364
- save_cache:
365
- key: v1-ipfs-webui-{{ checksum "~/ipfs/go-ipfs/ipfs-webui/package-lock.json" }}
365
+ key: v1-ipfs-webui-{{ checksum "~/ipfs/kubo/ipfs-webui/package-lock.json" }}
366
paths:
367
- ~/.cache/ms-playwright
368
- - ~/ipfs/go-ipfs/ipfs-webui/node_modules
368
+ - ~/ipfs/kubo/ipfs-webui/node_modules
369
# We only run build as a test here. DockerHub images are built and published
370
- # by GitHub Action now: https://github.com/ipfs/go-ipfs/pull/8467
370
+ # by GitHub Action now: https://github.com/ipfs/kubo/pull/8467
371
docker-build:
372
executor: dockerizer
373
steps: