Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/pagopa/pagopa-gpd-payments
Payments microservice for debt position
https://github.com/pagopa/pagopa-gpd-payments
pagopa-gpd
Last synced: about 2 months ago
JSON representation
Payments microservice for debt position
- Host: GitHub
- URL: https://github.com/pagopa/pagopa-gpd-payments
- Owner: pagopa
- Created: 2022-11-15T14:06:02.000Z (about 2 years ago)
- Default Branch: main
- Last Pushed: 2024-04-12T12:48:31.000Z (10 months ago)
- Last Synced: 2024-04-12T20:18:54.706Z (10 months ago)
- Topics: pagopa-gpd
- Language: Java
- Homepage:
- Size: 970 KB
- Stars: 1
- Watchers: 6
- Forks: 2
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- Codeowners: CODEOWNERS
Awesome Lists containing this project
README
# Payments
[![Quality Gate Status](https://sonarcloud.io/api/project_badges/measure?project=pagopa_pagopa-gpd-payments&metric=alert_status)](https://sonarcloud.io/summary/new_code?id=pagopa_pagopa-gpd-payments)
[![Integration Tests](https://github.com/pagopa/pagopa-gpd-payments/actions/workflows/integration_test.yml/badge.svg)](https://github.com/pagopa/pagopa-gpd-payments/actions/workflows/integration_test.yml)- [Payments](#payments)
* [Api Documentation ๐](#api-documentation---)
* [Technology Stack ๐](#technology-stack---)
* [Start Project Locally ๐](#start-project-locally---)
+ [Prerequisites](#prerequisites)
+ [Run docker container](#run-docker-container)
* [Develop Locally ๐ป](#develop-locally---)
+ [Prerequisites](#prerequisites-1)
+ [Run the project](#run-the-project)
* [Testing ๐งช](#testing---)
- [Unit testing](#unit-testing)
- [Integration testing](#integration-testing)
- [Load testing](#load-testing)
* [Mainteiners ๐จโ๐ป](#mainteiners------)
---
## Api Documentation ๐
See the [OpenApi 3 here.](https://editor.swagger.io/?url=https://raw.githubusercontent.com/pagopa/pagopa-gpd-payments/main/openapi/openapi.json)---
## Technology Stack ๐
- Java 17
- Spring Boot
- Spring Web
- Feign Client---
## Start Project Locally ๐
### Prerequisites
- docker
- a running GPD mock (see `mock` folder of this repository)### Run docker container
Under main folder typing:
`docker build pagopagpdpayments`
or under docker folder typing:
`docker-compose up --build`
#### Known issues:
- if you have a Mac with m1 processor and you want to start the project locally using the Docker Compose, you must update
this instruction in the Dockerfile as follows `FROM --platform=linux/amd64 adoptopenjdk/openjdk16:alpine`
- If you run this command on Mac device, you may find an error related to the impossibility to generate the Docker containers:
`... SomeServiceTest IllegalState Previous attempts to find a Docker environment`
This could be caused by a permission issue during the generation of these containers. In order to perform correctly the
`docker-compose` command in local, is recommended to leave the `test.skip` parameter in the `maven package` phase to `true` and
rely on code-review pipeline for the execution of the unit tests.---
## Develop Locally ๐ป
### Prerequisites
- git
- maven
- jdk-11
- docker### Run the project
Under main folder typing:
`mvn spring-boot:run -Dspring-boot.run.profiles=local`
---
## Testing ๐งช
### Prerequisites
- maven
- [newman](https://www.npmjs.com/package/newman)
- [postman-to-k6](https://github.com/apideck-libraries/postman-to-k6)
- [k6](https://k6.io/)### Unit testing
Under `payments` folder typing:
`mvn clean verify -DGPD_SUBSCRIPTION_KEY=secret -DGPS_SUBSCRIPTION_KEY=secret -DAPICONFIG_SUBSCRIPTION_KEY=secret -DGPD_HOST=host -DGPS_HOST=host -DAPI_CONFIG_HOST=host`
### Integration testing
Under `payments` folder typing:
```sh
newman run api-test/GPD.postman_collection.json --environment=api-test/local.postman_environment.json
```> **NOTE**: suppose `Started Payments` on port `8080`
### Load testing
Under `payments` folder typing:
```sh
postman-to-k6 api-test/GPD.postman_collection.json --environment api-test/local.postman_environment.json -o ./k6-script.js
k6 run --vus 2 --duration 30s ./k6-script.js
```> **NOTE**: suppose `Started Payments` on port `8085`
---
## Mainteiners ๐จโ๐ป
See `CODEOWNERS` file