Giter Site home page Giter Site logo

silvergama / streetfair Goto Github PK

View Code? Open in Web Editor NEW
5.0 2.0 0.0 384 KB

Street Fair is an information center for street fairs in the city of São Paulo.

Go 94.37% Dockerfile 0.70% Makefile 4.93%
golang go makefile docker docker-compose clean-architecture cmd

streetfair's Introduction

Quality Gate Status Maintainability Rating Reliability Rating Security Rating Coverage

Street Fair

Street Fair

The objective of this project is to centralize information about street fairs in the city of São Paulo.

Running

This app is written in Golang. If you don't have experience with it: https://golang.org/doc/install. It depends on a Golang version with module support (at least 1.11, latest version is recommended). Should you interoperate with Golang versions >= 1.11, don't forget to proper set your GO111MODULE environment variable (https://dev.to/maelvls/why-is-go111module-everywhere-and-everything-about-go-modules-24k)

Install deps

  • Install docker and docker-compose

Attention: you should first set $GOBIN environment variable, add it to the $PATH, and then run the commands bellow:

How to Run

  • Install dependencies
$ make clean install
  • To running local dependencies if you want to run the application using local dependencies with docker, run the command below before running the API
$ make deps/up
  • To run import CSV
$ make run/import file=docs/example.csv
  • To stop
$ make deps/down
  • To run API
$ make run/api
  • To help
$ make help

Test coverage

  • To generate
$ make coverage
  • To show in browser
$ make coverage-html

Runing tests

Just run:

$ make test

Log

All logs are stored in the fair.log file.

  • To show logs:
$ make show/logs

Then commit the contents of docs/swagger dir.

Swagger

When change/add any HTTP API stuff, just run:

$ make swagger/api 

Then commit the contents of docs/swagger dir.

Docker

This tasks below are used from CircleCI flow but FTW:

Generate test image to run tests and coverage:

make docker/build

With the test image we can run test and coverage inside CircleCI:

make docker/test
make docker/coverage

Generate final image getting binary from test image:

make docker/image

streetfair's People

Contributors

silvergama avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.