Skip to content

Commit

Permalink
Merge pull request #118 from minos-framework/0.5.0
Browse files Browse the repository at this point in the history
0.5.0
  • Loading branch information
Sergio García Prado authored Feb 3, 2022
2 parents cf5b008 + f2dd319 commit 2f621a2
Show file tree
Hide file tree
Showing 211 changed files with 8,224 additions and 2,304 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
uses: actions/checkout@v2

- name: Install Poetry
uses: snok/install-poetry@v1.1.4
uses: snok/install-poetry@v1

- name: Install dependencies
run: make install
Expand Down
33 changes: 33 additions & 0 deletions .github/workflows/minos-broker-kafka-publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: "Publish: minos-broker-kafka"

on:
push:
branches:
- '*.*.x'
paths:
- 'packages/plugins/minos-broker-kafka/**'

jobs:
deploy:
runs-on: ubuntu-latest
container: python:3.9-buster
defaults:
run:
working-directory: packages/plugins/minos-broker-kafka

steps:

- name: Check out repository code
uses: actions/checkout@v2

- name: Install Poetry
uses: snok/install-poetry@v1

- name: Install dependencies
run: make install

- name: Publish package
run: make release
env:
POETRY_HTTP_BASIC_PYPI_USERNAME: ${{ secrets.PYPI_USERNAME }}
POETRY_HTTP_BASIC_PYPI_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
79 changes: 79 additions & 0 deletions .github/workflows/minos-broker-kafka-tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
name: "Test: minos-broker-kafka"

on:
push:
branches:
- main
- '*.*.x'
pull_request:
paths:
- 'packages/plugins/minos-broker-kafka/**'
- 'packages/core/minos-microservice-networks/**'
- 'packages/core/minos-microservice-common/**'

jobs:
build:
runs-on: ubuntu-latest
container: python:3.9-buster
defaults:
run:
working-directory: packages/plugins/minos-broker-kafka

services:
postgres:
image: postgres
env:
POSTGRES_USER: minos
POSTGRES_PASSWORD: min0s
POSTGRES_DB: order_db
ports:
- 5432:5432
options: --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5

zookeeper:
image: wurstmeister/zookeeper:latest
ports:
- 2181:2181

kafka:
image: wurstmeister/kafka:latest
ports:
- 9092:9092
env:
KAFKA_ZOOKEEPER_CONNECT: zookeeper:2181
KAFKA_ADVERTISED_HOST_NAME: kafka
KAFKA_DELETE_TOPIC_ENABLE: "true"
env:
MINOS_BROKER_QUEUE_HOST: postgres
MINOS_BROKER_HOST: kafka
MINOS_REPOSITORY_HOST: postgres
MINOS_SNAPSHOT_HOST: postgres

steps:
- name: Check out repository code
uses: actions/checkout@v2

- name: Install Poetry
uses: snok/install-poetry@v1

- name: Install dependencies
run: make install

- name: Lint package
run: make lint

- name: Test package with coverage
run: make coverage

- name: Publish coverage
uses: codecov/codecov-action@v2
with:
token: ${{ secrets.CODECOV_TOKEN }}
files: ./packages/plugins/minos-broker-kafka/coverage.xml
fail_ci_if_error: true

- name: Generate documentation
run: make docs

- name: Generate build
run: make dist
33 changes: 33 additions & 0 deletions .github/workflows/minos-discovery-minos-publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: "Publish: minos-discovery-minos"

on:
push:
branches:
- '*.*.x'
paths:
- 'packages/plugins/minos-discovery-minos/**'

jobs:
deploy:
runs-on: ubuntu-latest
container: python:3.9-buster
defaults:
run:
working-directory: packages/plugins/minos-discovery-minos

steps:

- name: Check out repository code
uses: actions/checkout@v2

- name: Install Poetry
uses: snok/install-poetry@v1

- name: Install dependencies
run: make install

- name: Publish package
run: make release
env:
POETRY_HTTP_BASIC_PYPI_USERNAME: ${{ secrets.PYPI_USERNAME }}
POETRY_HTTP_BASIC_PYPI_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
49 changes: 49 additions & 0 deletions .github/workflows/minos-discovery-minos-tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
name: "Test: minos-discovery-minos"

on:
push:
branches:
- main
- '*.*.x'
pull_request:
paths:
- 'packages/plugins/minos-discovery-minos/**'
- 'packages/core/minos-microservice-networks/**'
- 'packages/core/minos-microservice-common/**'

jobs:
build:
runs-on: ubuntu-latest
container: python:3.9-buster
defaults:
run:
working-directory: packages/plugins/minos-discovery-minos

steps:
- name: Check out repository code
uses: actions/checkout@v2

- name: Install Poetry
uses: snok/install-poetry@v1

- name: Install dependencies
run: make install

- name: Lint package
run: make lint

- name: Test package with coverage
run: make coverage

- name: Publish coverage
uses: codecov/codecov-action@v2
with:
token: ${{ secrets.CODECOV_TOKEN }}
files: ./packages/plugins/minos-discovery-minos/coverage.xml
fail_ci_if_error: true

- name: Generate documentation
run: make docs

- name: Generate build
run: make dist
1 change: 1 addition & 0 deletions .github/workflows/minos-microservice-aggregate-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ on:
push:
branches:
- main
- '*.*.x'
pull_request:
paths:
- 'packages/core/minos-microservice-aggregate/**'
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/minos-microservice-common-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:
uses: actions/checkout@v2

- name: Install Poetry
uses: snok/install-poetry@v1.1.4
uses: snok/install-poetry@v1

- name: Install dependencies
run: make install
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/minos-microservice-common-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ on:
push:
branches:
- main
- '*.*.x'
pull_request:
paths:
- 'packages/core/minos-microservice-common/**'
Expand Down Expand Up @@ -37,7 +38,7 @@ jobs:
uses: actions/checkout@v2

- name: Install Poetry
uses: snok/install-poetry@v1.1.4
uses: snok/install-poetry@v1

- name: Install dependencies
run: make install
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/minos-microservice-cqrs-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:
uses: actions/checkout@v2

- name: Install Poetry
uses: snok/install-poetry@v1.1.4
uses: snok/install-poetry@v1

- name: Install dependencies
run: make install
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/minos-microservice-cqrs-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ on:
push:
branches:
- main
- '*.*.x'
pull_request:
paths:
- 'packages/core/minos-microservice-cqrs/**'
Expand Down Expand Up @@ -40,7 +41,7 @@ jobs:
uses: actions/checkout@v2

- name: Install Poetry
uses: snok/install-poetry@v1.1.4
uses: snok/install-poetry@v1

- name: Install dependencies
run: make install
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/minos-microservice-networks-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:
uses: actions/checkout@v2

- name: Install Poetry
uses: snok/install-poetry@v1.1.4
uses: snok/install-poetry@v1

- name: Install dependencies
run: make install
Expand Down
16 changes: 2 additions & 14 deletions .github/workflows/minos-microservice-networks-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ on:
push:
branches:
- main
- '*.*.x'
pull_request:
paths:
- 'packages/core/minos-microservice-networks/**'
Expand All @@ -28,19 +29,6 @@ jobs:
- 5432:5432
options: --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5

zookeeper:
image: wurstmeister/zookeeper:latest
ports:
- 2181:2181

kafka:
image: wurstmeister/kafka:latest
ports:
- 9092:9092
env:
KAFKA_ZOOKEEPER_CONNECT: zookeeper:2181
KAFKA_ADVERTISED_HOST_NAME: kafka
KAFKA_DELETE_TOPIC_ENABLE: "true"
env:
MINOS_BROKER_QUEUE_HOST: postgres
MINOS_BROKER_HOST: kafka
Expand All @@ -52,7 +40,7 @@ jobs:
uses: actions/checkout@v2

- name: Install Poetry
uses: snok/install-poetry@v1.1.4
uses: snok/install-poetry@v1

- name: Install dependencies
run: make install
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/minos-microservice-saga-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:
uses: actions/checkout@v2

- name: Install Poetry
uses: snok/install-poetry@v1.1.4
uses: snok/install-poetry@v1

- name: Install dependencies
run: make install
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/minos-microservice-saga-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ on:
push:
branches:
- main
- '*.*.x'
pull_request:
paths:
- 'packages/core/minos-microservice-saga/**'
Expand All @@ -24,7 +25,7 @@ jobs:
uses: actions/checkout@v2

- name: Install Poetry
uses: snok/install-poetry@v1.1.4
uses: snok/install-poetry@v1

- name: Install dependencies
run: make install
Expand Down
45 changes: 45 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
repos:
- repo: local
hooks:

- id: minos-microservice-aggregate-check
pass_filenames: false
entry: make --directory=packages/core/minos-microservice-aggregate check
name: Check minos-microservice-aggregate
files: ^packages/core/minos-microservice-aggregate/
language: system

- id: minos-microservice-common-check
pass_filenames: false
entry: make --directory=packages/core/minos-microservice-common check
name: Check minos-microservice-common
files: ^packages/core/minos-microservice-common/
language: system

- id: minos-microservice-cqrs-check
pass_filenames: false
entry: make --directory=packages/core/minos-microservice-cqrs check
name: Check minos-microservice-cqrs
files: ^packages/core/minos-microservice-cqrs/
language: system

- id: minos-microservice-networks-check
pass_filenames: false
entry: make --directory=packages/core/minos-microservice-networks check
name: Check minos-microservice-networks
files: ^packages/core/minos-microservice-networks/
language: system

- id: minos-microservice-saga-check
pass_filenames: false
entry: make --directory=packages/core/minos-microservice-saga check
name: Check minos-microservice-saga
files: ^packages/core/minos-microservice-saga/
language: system

- id: minos-broker-kafka-check
pass_filenames: false
entry: make --directory=packages/plugins/minos-broker-kafka check
name: Check minos-broker-kafka
files: ^packages/plugins/minos-broker-kafka/
language: system
1 change: 1 addition & 0 deletions .sonarcloud.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
sonar.python.version=3.9
Loading

0 comments on commit 2f621a2

Please sign in to comment.