Go PostgreSQL CI/CD
Project to test CI/CD pipeline
Endpoints
Root URL: localhost:8080/
Method |
URL |
Description |
GET |
/products |
Fetch list of products |
GET |
/products/{id} |
Fetch a product by ID |
POST |
/products |
Create a new product |
PUT |
/products/{id} |
Update an existing product retrieved by ID |
DELETE |
/products/{id} |
Delete a product by ID |
Build
make build
Test
/!\ WARN
Requires Docker-in-Docker if run from CI/CD
All tests
make test
Unit tests
make unit-test
Integration tests
/!\ WARN
Requires Docker up and running
make integr-test
Show coverage
# cli
make coverage-cli
# browser
make coverage-browser
Run
/!\ WARN
Requires Docker up and running
/!\ WARN
Requires PostgreSQL database
make start-postgres
make run
Container
/!\ WARN
Requires Docker up and running
Build
make container-build CONTAINER_TAG=dev
Push
make container-push CONTAINER_TAG=dev