Skip to content

Commit ddb798e

Browse files
author
Sergio García Prado
authored
Merge pull request #284 from Clariteia/0.0.3
0.0.3
2 parents f6b383c + 1198e57 commit ddb798e

File tree

229 files changed

+61749
-1931
lines changed

Some content is hidden

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

229 files changed

+61749
-1931
lines changed

.github/workflows/integration-tests.yml

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
name: Integration Tests
2+
13
on: push
24

35
jobs:
@@ -14,4 +16,12 @@ jobs:
1416
run: make integration-tests
1517

1618
- name: Stop System
17-
run: make down
19+
run: make export-logs down
20+
if: always()
21+
22+
- name: Archive Artifacts
23+
uses: actions/upload-artifact@v2
24+
with:
25+
name: system-logs
26+
path: logs.txt
27+
if: always()

.github/workflows/microservice-user-tests.yml renamed to .github/workflows/microservice-authentication-tests.yml

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
1-
on:
2-
push:
3-
paths:
4-
- 'microservices/user/**'
1+
name: Unit Tests - Authentication
2+
3+
on: push
54

65
jobs:
76
build:
@@ -11,7 +10,7 @@ jobs:
1110
postgres:
1211
image: postgres
1312
env:
14-
POSTGRES_DB: user_db
13+
POSTGRES_DB: auth_db
1514
POSTGRES_USER: minos
1615
POSTGRES_PASSWORD: min0s
1716
ports:
@@ -32,7 +31,7 @@ jobs:
3231
KAFKA_ADVERTISED_HOST_NAME: kafka
3332
defaults:
3433
run:
35-
working-directory: ./microservices/user
34+
working-directory: ./microservices/authentication
3635

3736
env:
3837
MINOS_REPOSITORY_HOST: postgres
Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
name: Unit Tests - Cart
2+
3+
on: push
4+
5+
jobs:
6+
build:
7+
runs-on: ubuntu-latest
8+
container: python:3.9-buster
9+
services:
10+
postgres:
11+
image: postgres
12+
env:
13+
POSTGRES_DB: cart_db
14+
POSTGRES_USER: minos
15+
POSTGRES_PASSWORD: min0s
16+
ports:
17+
- 5432:5432
18+
options: --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5
19+
20+
zookeeper:
21+
image: wurstmeister/zookeeper:latest
22+
ports:
23+
- 2181:2181
24+
25+
kafka:
26+
image: wurstmeister/kafka:latest
27+
ports:
28+
- 9092:9092
29+
env:
30+
KAFKA_ZOOKEEPER_CONNECT: zookeeper:2181
31+
KAFKA_ADVERTISED_HOST_NAME: kafka
32+
defaults:
33+
run:
34+
working-directory: ./microservices/cart
35+
36+
env:
37+
MINOS_REPOSITORY_HOST: postgres
38+
MINOS_SNAPSHOT_HOST: postgres
39+
MINOS_BROKER_QUEUE_HOST: postgres
40+
MINOS_BROKER_HOST: kafka
41+
42+
steps:
43+
- name: Check out repository code
44+
uses: actions/checkout@v2
45+
46+
- name: Install Poetry
47+
uses: snok/[email protected]
48+
49+
- name: Install dependencies
50+
run: poetry install
51+
52+
- name: Run tests
53+
run: poetry run pytest
Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
name: Unit Tests - Customer
2+
3+
on: push
4+
5+
jobs:
6+
build:
7+
runs-on: ubuntu-latest
8+
container: python:3.9-buster
9+
services:
10+
postgres:
11+
image: postgres
12+
env:
13+
POSTGRES_DB: customer_db
14+
POSTGRES_USER: minos
15+
POSTGRES_PASSWORD: min0s
16+
ports:
17+
- 5432:5432
18+
options: --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5
19+
20+
zookeeper:
21+
image: wurstmeister/zookeeper:latest
22+
ports:
23+
- 2181:2181
24+
25+
kafka:
26+
image: wurstmeister/kafka:latest
27+
ports:
28+
- 9092:9092
29+
env:
30+
KAFKA_ZOOKEEPER_CONNECT: zookeeper:2181
31+
KAFKA_ADVERTISED_HOST_NAME: kafka
32+
defaults:
33+
run:
34+
working-directory: ./microservices/customer
35+
36+
env:
37+
MINOS_REPOSITORY_HOST: postgres
38+
MINOS_SNAPSHOT_HOST: postgres
39+
MINOS_BROKER_QUEUE_HOST: postgres
40+
MINOS_BROKER_HOST: kafka
41+
42+
steps:
43+
- name: Check out repository code
44+
uses: actions/checkout@v2
45+
46+
- name: Install Poetry
47+
uses: snok/[email protected]
48+
49+
- name: Install dependencies
50+
run: poetry install
51+
52+
- name: Run tests
53+
run: poetry run pytest

.github/workflows/microservice-order-tests.yml

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
1-
on:
2-
push:
3-
paths:
4-
- 'microservices/order/**'
1+
name: Unit Tests - Order
2+
3+
on: push
54

65
jobs:
76
build:

.github/workflows/microservice-payment-tests.yml

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
1-
on:
2-
push:
3-
paths:
4-
- 'microservices/payment/**'
1+
name: Unit Tests - Payment
2+
3+
on: push
54

65
jobs:
76
build:

.github/workflows/microservice-product-tests.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
1-
on:
2-
push:
3-
paths:
4-
- 'microservices/product/**'
1+
name: Unit Tests - Product
2+
3+
on: push
54

65
jobs:
76
build:
@@ -44,6 +43,7 @@ jobs:
4443
MINOS_SAGA_QUEUE_HOST: postgres
4544

4645
steps:
46+
4747
- name: Check out repository code
4848
uses: actions/checkout@v2
4949

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
name: Unit Tests - Review
2+
3+
on: push
4+
5+
jobs:
6+
build:
7+
runs-on: ubuntu-latest
8+
container: python:3.9-buster
9+
services:
10+
postgres:
11+
image: postgres
12+
env:
13+
POSTGRES_DB: review_db
14+
POSTGRES_USER: minos
15+
POSTGRES_PASSWORD: min0s
16+
ports:
17+
- 5432:5432
18+
options: --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5
19+
20+
zookeeper:
21+
image: wurstmeister/zookeeper:latest
22+
ports:
23+
- 2181:2181
24+
25+
kafka:
26+
image: wurstmeister/kafka:latest
27+
ports:
28+
- 9092:9092
29+
env:
30+
KAFKA_ZOOKEEPER_CONNECT: zookeeper:2181
31+
KAFKA_ADVERTISED_HOST_NAME: kafka
32+
defaults:
33+
run:
34+
working-directory: ./microservices/review
35+
36+
env:
37+
MINOS_REPOSITORY_HOST: postgres
38+
MINOS_SNAPSHOT_HOST: postgres
39+
MINOS_BROKER_QUEUE_HOST: postgres
40+
MINOS_BROKER_HOST: kafka
41+
42+
steps:
43+
- name: Check out repository code
44+
uses: actions/checkout@v2
45+
46+
- name: Install Poetry
47+
uses: snok/[email protected]
48+
49+
- name: Install dependencies
50+
run: poetry install
51+
52+
- name: Run tests
53+
run: poetry run pytest

.github/workflows/microservice-ticket-tests.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
1-
on:
2-
push:
3-
paths:
4-
- 'microservices/ticket/**'
1+
name: Unit Tests - Ticket
2+
3+
on: push
54

65
jobs:
76
build:
@@ -41,6 +40,7 @@ jobs:
4140
MINOS_BROKER_HOST: kafka
4241

4342
steps:
43+
4444
- name: Check out repository code
4545
uses: actions/checkout@v2
4646

Makefile

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
build:
2-
docker-compose build --parallel
2+
docker-compose build --progres plain
33

44
up: build
55
echo "Starting containers..."
@@ -13,6 +13,10 @@ logs:
1313
echo "Showing logs..."
1414
docker-compose logs --follow
1515

16+
export-logs:
17+
echo "Showing logs..."
18+
docker-compose logs --no-color > logs.txt
19+
1620
integration-tests:
1721
echo "Running Integration Tests..."
1822
docker-compose run tavern

0 commit comments

Comments
 (0)