Skip to content
This repository was archived by the owner on Mar 18, 2025. It is now read-only.

Commit ad1bdc1

Browse files
authored
Merge branch 'master' into kubaw3f-patch-1
2 parents da579e7 + 1bc068f commit ad1bdc1

File tree

131 files changed

+5105
-2424
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

131 files changed

+5105
-2424
lines changed

.circleci/config.yml

Lines changed: 109 additions & 70 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
version: 2
1+
version: 2.1
22

33
jobs:
44
checkDependencies:
@@ -34,79 +34,108 @@ jobs:
3434
command: |
3535
yarn set version 3.2.2 && yarn install && yarn build && yarn workspace @1kv/core lint
3636
37-
# checkCommonESLint:
38-
# docker:
39-
# - image: node:18
40-
# resource_class: large
41-
# steps:
42-
# - checkout
43-
# - run:
44-
# environment:
45-
# YARN_ENABLE_IMMUTABLE_INSTALLS: false
46-
# command: |
47-
# yarn set version 3.2.2 && yarn install && yarn build && yarn workspace @1kv/common lint
48-
49-
testCommonUnit:
37+
checkCommonESLint:
5038
docker:
51-
- image: node:bullseye
52-
resource_class: xlarge
39+
- image: node:18
40+
resource_class: large
5341
steps:
5442
- checkout
5543
- run:
5644
environment:
5745
YARN_ENABLE_IMMUTABLE_INSTALLS: false
5846
command: |
59-
yarn set version 3.2.2
60-
yarn install
61-
yarn build
62-
if ! yarn workspace @1kv/common test:unit --testTimeout=60000; then
63-
echo "Unit tests failed, but not failing the job."
64-
echo 'export TESTS_FAILED=true' >> $BASH_ENV
65-
fi
47+
yarn set version 3.2.2 && yarn install && yarn build && yarn workspace @1kv/common lint
48+
49+
CommonUnitTests:
50+
description: "Common Unit Tests"
51+
docker:
52+
- image: node:18-bullseye
53+
- image: mongo:6.0.9
54+
name: mongodb
55+
resource_class: xlarge
56+
steps:
57+
- checkout
6658
- run:
67-
name: "Handle Test Failures"
59+
name: Install Dependencies
60+
command: yarn install --immutable
61+
- run:
62+
name: Run Tests
6863
command: |
69-
if [ "${TESTS_FAILED}" == "true" ]; then
70-
echo "Tests failed."
71-
exit 0
72-
fi
64+
export MONGO_URI="mongodb://mongodb:27017/testdb"
65+
yarn workspace @1kv/common test:unit
7366
74-
testCommonInt:
67+
ChaindataIntegrationTests:
68+
description: "Chaindata Integration Tests"
7569
docker:
76-
- image: node:bullseye
70+
- image: node:18-bullseye
71+
- image: mongo:6.0.9
72+
name: mongodb
7773
resource_class: xlarge
7874
steps:
7975
- checkout
8076
- run:
81-
environment:
82-
YARN_ENABLE_IMMUTABLE_INSTALLS: false
77+
name: Install Dependencies
78+
command: yarn install --immutable
79+
- run:
80+
name: Run Tests
81+
command: |
82+
export MONGO_URI="mongodb://mongodb:27017/testdb"
83+
yarn workspace @1kv/common test:chaindata:int
84+
85+
ApiHandlerIntegrationTests:
86+
description: "ApiHandler Integration Tests"
87+
docker:
88+
- image: node:18-bullseye
89+
- image: mongo:6.0.9
90+
name: mongodb
91+
resource_class: xlarge
92+
steps:
93+
- checkout
94+
- run:
95+
name: Install Dependencies
96+
command: yarn install --immutable
97+
- run:
98+
name: Run Tests
8399
command: |
84-
yarn set version 3.2.2
85-
yarn install
86-
yarn build
87-
if ! yarn workspace @1kv/common test:int --testTimeout=60000; then
88-
echo "Unit tests failed, but not failing the job."
89-
echo 'export TESTS_FAILED=true' >> $BASH_ENV
90-
fi
100+
export MONGO_URI="mongodb://mongodb:27017/testdb"
101+
yarn workspace @1kv/common test:apihandler:int
102+
103+
NominatorIntegrationTests:
104+
description: "Nominator Integration Tests"
105+
docker:
106+
- image: node:18-bullseye
107+
- image: mongo:6.0.9
108+
name: mongodb
109+
resource_class: xlarge
110+
steps:
111+
- checkout
112+
- run:
113+
name: Install Dependencies
114+
command: yarn install --immutable
91115
- run:
92-
name: "Handle Test Failures"
116+
name: Run Tests
93117
command: |
94-
if [ "${TESTS_FAILED}" == "true" ]; then
95-
echo "Tests failed."
96-
exit 0
97-
fi
118+
export MONGO_URI="mongodb://mongodb:27017/testdb"
119+
yarn workspace @1kv/common test:nominator:int
120+
121+
ScorekeeperIntegrationTests:
122+
description: "Scorekeeper Integration Tests"
123+
docker:
124+
- image: node:18-bullseye
125+
- image: mongo:6.0.9
126+
name: mongodb
98127

99-
# testCore:
100-
# docker:
101-
# - image: node:18
102-
# resource_class: large
103-
# steps:
104-
# - checkout
105-
# - run:
106-
# environment:
107-
# YARN_ENABLE_IMMUTABLE_INSTALLS: false
108-
# command: |
109-
# yarn set version 3.2.2 && yarn install && yarn build && yarn workspace @1kv/core test
128+
resource_class: xlarge
129+
steps:
130+
- checkout
131+
- run:
132+
name: Install Dependencies
133+
command: yarn install --immutable
134+
- run:
135+
name: Run Tests
136+
command: |
137+
export MONGO_URI="mongodb://mongodb:27017/testdb"
138+
yarn workspace @1kv/common test:scorekeeper:int
110139
111140
helmLint:
112141
docker:
@@ -255,26 +284,38 @@ workflows:
255284
filters:
256285
tags:
257286
ignore: /pull\/[0-9]+/
258-
# - checkCommonESLint:
259-
# filters:
260-
# tags:
261-
# only: /.*/
262-
- checkCoreESLint:
287+
- checkCommonESLint:
263288
filters:
264289
tags:
265290
only: /.*/
266-
- testCommonUnit:
291+
- checkCoreESLint:
267292
filters:
268293
tags:
269294
only: /.*/
270-
- testCommonInt:
295+
- CommonUnitTests:
271296
filters:
272297
tags:
273-
only: /.*/
274-
# - testCore:
275-
# filters:
276-
# tags:
277-
# only: /.*/
298+
ignore: /.*/
299+
300+
- ChaindataIntegrationTests:
301+
filters:
302+
tags:
303+
ignore: /.*/
304+
305+
- ApiHandlerIntegrationTests:
306+
filters:
307+
tags:
308+
ignore: /.*/
309+
310+
- NominatorIntegrationTests:
311+
filters:
312+
tags:
313+
ignore: /.*/
314+
315+
- ScorekeeperIntegrationTests:
316+
filters:
317+
tags:
318+
ignore: /.*/
278319
- helmLint:
279320
filters:
280321
tags:
@@ -306,9 +347,7 @@ workflows:
306347
requires:
307348
- helmLint
308349
- buildCoreImage
309-
- buildGatewayImage
310-
- testCommonUnit
311-
- testCommonInt
350+
312351
- publishCoreImage:
313352
context: dockerhub-bot
314353
filters:

.dockerignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,3 +17,6 @@ build
1717
.idea
1818
combined.log
1919
docker-compose.yml
20+
node_modules/
21+
22+
*/**/node_modules/

.gitignore

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@ combined.log
99
scripts/test
1010
config.json*
1111
build
12+
dist
13+
**/dist
1214

1315
# Yarn
1416
.yarn/*
@@ -34,3 +36,9 @@ docs/.DS_Store
3436
/packages/common/polkadot-slots.json
3537
/packages/core/coverage/
3638
/packages/common/coverage/
39+
40+
41+
.turbo
42+
build/**
43+
dist/**
44+
.next/**

.yarnrc.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,3 +11,8 @@ plugins:
1111
pnpMode: loose
1212

1313
yarnPath: .yarn/releases/yarn-3.2.2.cjs
14+
15+
packageExtensions:
16+
esbuild@*:
17+
dependencies:
18+
"@esbuild/linux-arm64": "*"

Dockerfile

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM node:18-slim AS builder
1+
FROM node:21-slim AS builder
22
ARG MATRIX_TOKEN
33
ARG PACKAGE
44
ENV PACKAGE ${PACKAGE}
@@ -7,9 +7,8 @@ COPY . .
77
RUN echo "building ${PACKAGE}... "; \
88
yarn install; \
99
echo "yarn install done. Building...." ; \
10-
yarn build; \
10+
yarn turbo; \
1111
echo "building ${PACKAGE} done."; \
1212
apt-get update && \
13-
apt-get install -y libssl-dev && \
1413
apt-get clean
1514
CMD yarn run start:js:${PACKAGE}

Dockerfile-dev

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,9 @@ WORKDIR /code
88
RUN echo "building ${PACKAGE}... "; \
99
yarn install; \
1010
echo "yarn install done. Building...." ; \
11-
yarn build; \
11+
yarn turbo; \
1212
echo "building ${PACKAGE} done."; \
1313
apt-get update && \
1414
apt-get install -y libssl-dev && \
1515
apt-get clean
16-
CMD yarn run start:dev:${PACKAGE}
16+
CMD yarn run start:dev:${PACKAGE}

apps/1kv-backend/templates/kusama-otv-backend.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ spec:
1717
source:
1818
repoURL: https://w3f.github.io/helm-charts/
1919
chart: otv-backend
20-
targetRevision: v3.1.6
20+
targetRevision: v3.1.7
2121
plugin:
2222
env:
2323
- name: HELM_VALUES

apps/1kv-backend/templates/polkadot-otv-backend.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ spec:
1717
source:
1818
repoURL: https://w3f.github.io/helm-charts/
1919
chart: otv-backend
20-
targetRevision: v3.1.6
20+
targetRevision: v3.1.7
2121
plugin:
2222
env:
2323
- name: HELM_VALUES

0 commit comments

Comments
 (0)