Since last May 12, 2019 every Spanish company is required to provide their employees a process to record their working hours.
This process can be as simple as signing in a paper the checks in and checks out for every single workday; but any other process can be used and this is the reason for which I decided to develop this project.
Initially the idea is to provide a RESTful API which could be used in any company to register those checks in and checks out, and allow the “administrators” to retrieve the data at any time they are requested to.
- RESTful API design.
- Test-driven development and Behavior-driven development.
- Isolated development environment (probably using Docker containers).
- Continuous Integration.
- Gitflow workflow.
- Storing persistent data in a relational database.
- Logging services.
- Authentication
The extended documentation is hosted under https://iris-garcia.github.io/workday/.
- Toolchain
- Continuous Integration
- Deployment
- API tests
- Code coverage
- Docker
- Continuous Deployment (GitHub webhook)
- Continuous Deployment (Travis CI)
- Provision
Mage is the build tool used in this project, for further details check out the documentation.
buildtool: magefile.go
Contenedor: http://api-workday.apps.us-east-2.starter.openshift-online.com
deployment: http://api-workday.apps.us-east-2.starter.openshift-online.com
The documentation showcasing how to get the project deployed in OpenShift is hosted here.
The latest version of the project as a Docker image is hosted in Docker Hub:
dockerhub: https://hub.docker.com/r/irisgarcia/workday
There is an Ansible playbook which can be used to provision a machine, setting up the infrastructure needed to deploy the app.
provision: .packer/ansible/workday.yml
The vagrant box already provisioned can be downloaded here:
vagrant: https://app.vagrantup.com/igarcia/boxes/workday
- Fork the repository.
- Clone your forked repository.
- Install the build tool
mage
go get github.com/magefile/mage
- Run
mage build
to install the dependencies and build the binary. - (optional) Run
mage startdev
to bootstrap a mariadb docker container. - To run the API HTTP Server issue the command:
mage start
.
- Create a new branch:
bug/short-description
feature/short-description
- Write tests to cover your changes.
- Run the tests.
mage test
- Push the branch to your fork once you think everything works as expected.
- Create a Pull Request from your branch to
master
.
[![Build Status](https://travis-ci.com/iris-garcia/workday.svg?branch=master)](https://travis-ci.com/iris-garcia/workday)