@@ -331,4 +331,53 @@ graph TD
331
331
get_method --> lambda_api_products
332
332
post_method --> lambda_api_products
333
333
334
+ ```
335
+
336
+ ## CI/CD Pipeline
337
+
338
+ ``` mermaid
339
+ graph TD
340
+ A[Push to main branch] -->|Trigger| B[CI/CD Pipeline]
341
+ B --> C[Test and Build API]
342
+ B --> D[Test and Build Scraper]
343
+
344
+ subgraph "Test and Build API"
345
+ C --> C1[Checkout code]
346
+ C1 --> C2[Set up Go]
347
+ C2 --> C3[Sync modules]
348
+ C3 --> C4[Cache dependencies]
349
+ C4 --> C5[Install dependencies]
350
+ C5 --> C6[Run golangci-lint]
351
+ C6 --> C7[Run tests]
352
+ C7 --> C8[Upload coverage to codecov]
353
+ C8 --> C9[Build API binary]
354
+ C9 --> C10[Zip API binary]
355
+ C10 --> C11[Upload API artifact]
356
+ end
357
+
358
+ subgraph "Test and Build Scraper"
359
+ D --> D1[Checkout code]
360
+ D1 --> D2[Set up Go]
361
+ D2 --> D3[Cache dependencies]
362
+ D3 --> D4[Install dependencies]
363
+ D4 --> D5[Run golangci-lint]
364
+ D5 --> D6[Run tests]
365
+ D6 --> D7[Upload coverage to codecov]
366
+ D7 --> D8[Build Scraper binary]
367
+ D8 --> D9[Zip Scraper binary]
368
+ D9 --> D10[Upload Scraper artifact]
369
+ end
370
+
371
+ C11 --> E[Deploy]
372
+ D10 --> E
373
+
374
+ subgraph "Deploy"
375
+ E --> E1[Checkout code]
376
+ E1 --> E2[Download API artifact]
377
+ E2 --> E3[Download Scraper artifact]
378
+ E3 --> E4[Set up Terraform]
379
+ E4 --> E5[Initialize Terraform]
380
+ E5 --> E6[Plan Terraform]
381
+ E6 --> E7[Apply Terraform]
382
+ end
334
383
```
0 commit comments