sakho3600 / egapro

Calcul de l'index d'égalité femme / homme dans les entreprises

Home Page:https://index-egapro.travail.gouv.fr

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

EgaPro

pipeline status Build Status codecov

Calcul de l'indexe d'égalité homme / femme dans les entreprises

Lancer le projet avec docker

Ajouter le fichier .env à la racine du projet:

cp .env.sample .env
cp yarn.lock packages/api
cp yarn.lock packages/app

Y modifier les variables d'environnement nécessaires, comme par exemple les accès au serveur kinto, au serveur de mail...

Puis lancer les conteneurs:

docker-compose up --build

Une fois que le message egapro_init-kinto_1 exited with code 0 est affiché dans le terminal, le site est accessible sur http://localhost:8080.

Contribuer au projet

Pour contribuer au projet et avoir de l'auto-reload de l'application et de l'API lors d'un changement de fichier, ils ne sont pas lancés via docker, mais directement avec yarn. Kinto, la base de donnée et memcache sont eux toujours lancés (automatiquement) via docker-compose:

yarn install

Ensuite pour démarrer le frontend :

yarn start

Et le site est accessible sur http://localhost:3000

Tests

Integration

$ yarn start
#
# In another terminal
$ cd optional/e2e
$ yarn
$ yarn test

End Points

Action API body Réponse
GET api/version { version: string }
POST api/indicators-datas { } {id: string}
PUT api/indicators-datas/{id} { id: string, data: string} {id: string, data: string}
GET api/indicators-datas/{id} {id: string, data: string}
POST api/indicators-datas/{id}/emails { email: string } status = 200 ou 400

Release policy

Auto

Trigger a custom build on Travis (in the "More options" right menu) on the master branch with a custom config:

env:
  global:
    - RELEASE=true

You can change the lerna arguments though the LERNA_ARGS variable.

env:
  global:
    - LERNA_ARGS="major --force-publish --yes"
    - RELEASE=true

Manual

You need an Github token to release.

#
# Bump, push to git and publish to npm
$ GH_TOKEN=${GITHUB_TOKEN} yarn lerna version

#
# You might want to add a Gif to your release to make it groovy ;)

About

Calcul de l'index d'égalité femme / homme dans les entreprises

https://index-egapro.travail.gouv.fr

License:Apache License 2.0


Languages

Language:TypeScript 89.5%Language:Python 6.6%Language:JavaScript 2.2%Language:Shell 0.9%Language:HTML 0.4%Language:CSS 0.3%Language:Dockerfile 0.2%