Giter VIP home page Giter VIP logo

verification's Introduction

Verification Service

Backend service for verification. API documentation

Getting started

Prerequisities:

  • Install Go (On OS X with Homebrew you can just run brew install go.)
  • [optional to debug] Postman

Setup the project

Clone the repository with:

go get -u github.com/expandorg/verification

OR

create a directory $GOPATH/src/github/expandorg and execute: git clone [email protected]:expandorg/verification.git

Run the project dependencies (db, etc.) with make up

Run the latest migration with make migrate-latest

Run the project with make run

Dependencies

We use dep to manage our dependencies.

To add a new vendor, use:

deps ensure -add DEPENDENCY

To update vendors for built project, run:

make update-deps

CI / CD

We use Google Cloud for CI/CD:

note: please don't modify the following files unless you know what you're doing :)

cloudbuild.yaml: this effectively our CI, it run tests on every PR and will โœ“ or x.

cloudbuild.cd.yaml: this effectively our CD, it run tests, builds and pushes the image to the container registry and deploys to production on every Master commit, so master has to be always clean.

k8s.yaml: this is the kubernetes setup, including workload and service setup. cloudbuild.cd uses this file to deploy.

Database

Add a new migration

make add-migration name="migration_name"

For migration names be descriptive and start with verbs: create_, drop_, add_, etc.

This will look at the latest migrated version (1, 2, 3) and creates 2 files with new version:

2_migration_name.up.sql and 2_migration_name.down.sql

Migrate

You can migrate to latest:

make migrate-latest

OR

You can migrate up and migrate down a version:

make run-migrations action="goto" version="1"

When you migrate up, you can see in the schema_migrations the last migrated version. When you migrate down, it updates the the version column in schema_migrations.

Tests

make run-tests

Unit tests

We keep all unit tests close to the code and withing the same package. For example, if you want to test the service package, then you would add the tests in that folder marked package service.

Functional

We keep all functional tests in tests/ folder. Create a new test file for every function.

How to Contribute

If you're interested in contributing to the verification service:

License

Verification service is licensed under the MPL-2 license

verification's People

Contributors

edshadi avatar kieranoreilly avatar sslava avatar

Stargazers

 avatar

Watchers

 avatar  avatar  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.