diff --git a/.github/dependabot.yml b/.github/dependabot.yml index 6c37903..231a3d3 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -11,4 +11,4 @@ updates: ignore: - dependency-name: '*' versions: - - '>= 0' \ No newline at end of file + - '>= 0' diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md index 848fe93..64cad0c 100644 --- a/.github/pull_request_template.md +++ b/.github/pull_request_template.md @@ -36,4 +36,4 @@ Explain here how this PR will be tested by the reviewer: commands, dependencies, ## Follow-ups Add here any thought that you consider could be identified as an actionable step once this PR is merged. ---> \ No newline at end of file +--> diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml new file mode 100644 index 0000000..5cf6245 --- /dev/null +++ b/.github/workflows/codeql-analysis.yml @@ -0,0 +1,38 @@ +name: CodeQL + +on: + push: + branches: [ develop, main ] + pull_request: + branches: [ develop, main ] + +concurrency: + group: ${{ github.workflow }}-${{ github.head_ref || github.sha }} + cancel-in-progress: true + +jobs: + analyze: + strategy: + fail-fast: false + matrix: + language: [ csharp ] + + permissions: + security-events: write + + runs-on: ubuntu-22.04 + + steps: + - name: Checkout Repository + uses: actions/checkout@v3 + + - name: Initialize CodeQL + uses: github/codeql-action/init@v2 + with: + languages: ${{ matrix.language }} + + - name: Autobuild + uses: github/codeql-action/autobuild@v2 + + - name: Perform CodeQL Analysis + uses: github/codeql-action/analyze@v2 diff --git a/.gitpod.Dockerfile b/.gitpod.Dockerfile new file mode 100644 index 0000000..9c1e96b --- /dev/null +++ b/.gitpod.Dockerfile @@ -0,0 +1 @@ +FROM gitpod/workspace-dotnet:latest diff --git a/.gitpod.yml b/.gitpod.yml new file mode 100644 index 0000000..3abed97 --- /dev/null +++ b/.gitpod.yml @@ -0,0 +1,27 @@ +# https://github.com/gitpod-samples/template-dotnet-core-cli-csharp +# https://www.gitpod.io/docs/introduction/languages/dotnet +# https://github.com/gitpod-samples/template-docker-compose +# https://www.gitpod.io/docs/references/gitpod-yml +# https://www.gitpod.io/docs/configure +# https://www.gitpod.io/docs/configure/workspaces/ports + +image: + file: .gitpod.Dockerfile + +# https://www.gitpod.io/docs/configure/workspaces/tasks#execution-order +# https://www.gitpod.io/docs/configure/projects/prebuilds +tasks: + - name: Init Docker-Compose + init: | + docker-compose pull + docker-compose -f ./deployments/docker-compose/infrastracture.yaml up -d + - name: Restore & Build + init: | + dotnet dev-certs https + dotnet restore + dotnet build + +vscode: + extensions: + - ms-azuretools.vscode-docker + - muhammad-sammy.csharp diff --git a/CHANGELOG.md b/CHANGELOG.md new file mode 100644 index 0000000..c93dc1f --- /dev/null +++ b/CHANGELOG.md @@ -0,0 +1,11 @@ +# Changelog + +## [1.3.0](https://github.com/meysamhadeli/booking-microservices/compare/v1.2.0...v1.3.0) (2023-01-03) + + +### Features + +* Add health-options ([624194b](https://github.com/meysamhadeli/booking-microservices/commit/624194bb0161749281d1a3072ba7a93b7743a08e)) +* Add serilog sentry ([54471a1](https://github.com/meysamhadeli/booking-microservices/commit/54471a1128b4897ecdbd01cb384ceacef6b13165)) +* Change in docker files config ([c474890](https://github.com/meysamhadeli/booking-microservices/commit/c4748908b9a84d9bee50de11273023888544b24e)) +* Update all nuget packages ([edd50ac](https://github.com/meysamhadeli/booking-microservices/commit/edd50ac41a55ec2e62d506149a128f13475c3b7b)) diff --git a/README.md b/README.md index 5127951..7e8ba7f 100644 --- a/README.md +++ b/README.md @@ -30,11 +30,11 @@ - :sparkle: Using `gRPC` for internal communication between our microservices. - :sparkle: Using `CQRS` implementation with `MediatR` library. - :sparkle: Using `SqlServer` for `write side` of some microservices. -- :sparkle: Using `MongoDB` for `read side` of all microservices. +- :sparkle: Using `MongoDB` for `read side` of some microservices. - :sparkle: Using `Event Store` for `write side` of Booking-Microservice to store all `historical state` of aggregate. - :sparkle: Using `Inbox Pattern` for ensuring message idempotency for receiver and `Exactly once Delivery`. - :sparkle: Using `Outbox Pattern` for ensuring no message is lost and there is at `Least One Delivery`. -- :sparkle: Using `Unit Testing`, `Integration Testing` for testing level. +- :sparkle: Using `Unit Testing`, `Integration Testing`, `End To End Testing` for testing level. - :sparkle: Using `Fluent Validation` and a `Validation Pipeline Behaviour` on top of `MediatR`. - :sparkle: Using `Minimal API` for all endpoints. - :sparkle: Using `Health Check` for reporting the health of app infrastructure components. @@ -85,7 +85,6 @@ High-level plan is represented in the table - ✔️ **[`MongoDB.Driver`](https://github.com/mongodb/mongo-csharp-driver)** - .NET Driver for MongoDB. - ✔️ **[`xUnit.net`](https://github.com/xunit/xunit)** - A free, open source, community-focused unit testing tool for the .NET Framework. - ✔️ **[`Respawn`](https://github.com/jbogard/Respawn)** - Respawn is a small utility to help in resetting test databases to a clean state. -- ✔️ **[`Mongo2Go`](https://github.com/Mongo2Go/Mongo2Go)** - Providing multiple, temporary and isolated MongoDB databases for unit tests (or to be precise: integration tests). - ✔️ **[`Testcontainers`](https://github.com/testcontainers/testcontainers-dotnet)** - Testcontainers for .NET is a library to support tests with throwaway instances of Docker containers. ## The Domain And Bounded Context - Service Boundary @@ -139,13 +138,18 @@ Using the CQRS pattern, we cut each business functionality into vertical slices, Run the following commands for [Config SSL](https://docs.microsoft.com/en-us/aspnet/core/security/docker-compose-https?view=aspnetcore-6.0) in your system +#### Windows using Linux containers ```bash -dotnet dev-certs https -ep %USERPROFILE%\.aspnet\https\aspnetapp.pfx -p {password here} +dotnet dev-certs https -ep %USERPROFILE%\.aspnet\https\aspnetapp.pfx -p password dotnet dev-certs https --trust ``` - > Note: for running this command in `powershell` use `$env:USERPROFILE` instead of `%USERPROFILE%` +#### macOS or Linux +```bash +dotnet dev-certs https -ep ${HOME}/.aspnet/https/aspnetapp.pfx -p $CREDENTIAL_PLACEHOLDER$ +dotnet dev-certs https --trust +``` ### Docker Compose Run this app in docker using the [docker-compose.yaml](./deployments/docker-compose/docker-compose.yaml) file with the below command at the root of the application: