|
1 | | -version: 2 |
| 1 | +version: 2.1 |
2 | 2 |
|
3 | 3 | jobs: |
4 | 4 | checkDependencies: |
@@ -34,79 +34,108 @@ jobs: |
34 | 34 | command: | |
35 | 35 | yarn set version 3.2.2 && yarn install && yarn build && yarn workspace @1kv/core lint |
36 | 36 |
|
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: |
50 | 38 | docker: |
51 | | - - image: node:bullseye |
52 | | - resource_class: xlarge |
| 39 | + - image: node:18 |
| 40 | + resource_class: large |
53 | 41 | steps: |
54 | 42 | - checkout |
55 | 43 | - run: |
56 | 44 | environment: |
57 | 45 | YARN_ENABLE_IMMUTABLE_INSTALLS: false |
58 | 46 | 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 |
66 | 58 | - run: |
67 | | - name: "Handle Test Failures" |
| 59 | + name: Install Dependencies |
| 60 | + command: yarn install --immutable |
| 61 | + - run: |
| 62 | + name: Run Tests |
68 | 63 | 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 |
73 | 66 |
|
74 | | - testCommonInt: |
| 67 | + ChaindataIntegrationTests: |
| 68 | + description: "Chaindata Integration Tests" |
75 | 69 | docker: |
76 | | - - image: node:bullseye |
| 70 | + - image: node:18-bullseye |
| 71 | + - image: mongo:6.0.9 |
| 72 | + name: mongodb |
77 | 73 | resource_class: xlarge |
78 | 74 | steps: |
79 | 75 | - checkout |
80 | 76 | - 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 |
83 | 99 | 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 |
91 | 115 | - run: |
92 | | - name: "Handle Test Failures" |
| 116 | + name: Run Tests |
93 | 117 | 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 |
98 | 127 |
|
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 |
110 | 139 |
|
111 | 140 | helmLint: |
112 | 141 | docker: |
@@ -255,26 +284,38 @@ workflows: |
255 | 284 | filters: |
256 | 285 | tags: |
257 | 286 | ignore: /pull\/[0-9]+/ |
258 | | - # - checkCommonESLint: |
259 | | - # filters: |
260 | | - # tags: |
261 | | - # only: /.*/ |
262 | | - - checkCoreESLint: |
| 287 | + - checkCommonESLint: |
263 | 288 | filters: |
264 | 289 | tags: |
265 | 290 | only: /.*/ |
266 | | - - testCommonUnit: |
| 291 | + - checkCoreESLint: |
267 | 292 | filters: |
268 | 293 | tags: |
269 | 294 | only: /.*/ |
270 | | - - testCommonInt: |
| 295 | + - CommonUnitTests: |
271 | 296 | filters: |
272 | 297 | 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: /.*/ |
278 | 319 | - helmLint: |
279 | 320 | filters: |
280 | 321 | tags: |
@@ -306,9 +347,7 @@ workflows: |
306 | 347 | requires: |
307 | 348 | - helmLint |
308 | 349 | - buildCoreImage |
309 | | - - buildGatewayImage |
310 | | - - testCommonUnit |
311 | | - - testCommonInt |
| 350 | + |
312 | 351 | - publishCoreImage: |
313 | 352 | context: dockerhub-bot |
314 | 353 | filters: |
|
0 commit comments