2018-08-26 21:46:15 +00:00
|
|
|
# Build
|
|
|
|
|
2019-03-02 23:25:40 +00:00
|
|
|
**Authelia** is written in Typescript and built with [Authelia scripts](docs/authelia-scripts.md).
|
2018-08-26 21:46:15 +00:00
|
|
|
|
2019-03-02 23:25:40 +00:00
|
|
|
In order to build **Authelia**, you need to make sure Node with version >= 8 and < 10 and NPM is
|
2018-08-26 21:46:15 +00:00
|
|
|
installed on your machine.
|
|
|
|
|
2019-03-02 23:25:40 +00:00
|
|
|
Then, run the following command to install the node modules:
|
2018-08-26 21:46:15 +00:00
|
|
|
|
|
|
|
npm install
|
|
|
|
|
|
|
|
And, this command to build **Authelia** under dist/:
|
|
|
|
|
2019-03-02 23:25:40 +00:00
|
|
|
npm run build
|
|
|
|
|
|
|
|
Then you can also build the Docker image with:
|
|
|
|
|
|
|
|
npm run docker build
|
2018-08-26 21:46:15 +00:00
|
|
|
|
|
|
|
## Details
|
|
|
|
|
|
|
|
### Build
|
|
|
|
|
2019-03-02 23:25:40 +00:00
|
|
|
**Authelia** is made of two parts: the frontend and the backend.
|
2018-08-26 21:46:15 +00:00
|
|
|
|
2019-03-02 23:25:40 +00:00
|
|
|
The frontend is a [React](https://reactjs.org/) application written in Typescript and
|
|
|
|
the backend is an express application also written in Typescript.
|
2018-08-26 21:46:15 +00:00
|
|
|
|
|
|
|
### Tests
|
|
|
|
|
2019-03-02 23:25:40 +00:00
|
|
|
There are two kind of tests: unit tests and integration tests.
|
2018-08-26 21:46:15 +00:00
|
|
|
|
|
|
|
### Unit tests
|
|
|
|
|
2019-03-02 23:25:40 +00:00
|
|
|
To run the unit tests, run:
|
2018-08-26 21:46:15 +00:00
|
|
|
|
2019-03-02 23:25:40 +00:00
|
|
|
npm run unittest
|
2018-11-16 07:39:57 +00:00
|
|
|
|
2018-08-26 21:46:15 +00:00
|
|
|
### Integration tests
|
|
|
|
|
2019-03-02 23:25:40 +00:00
|
|
|
Integration tests run with Mocha and are based on Selenium. They generally
|
|
|
|
require a complete environment made of several components like redis, mongo and a LDAP
|
|
|
|
to run.
|
2018-08-26 21:46:15 +00:00
|
|
|
|
2019-03-02 23:25:40 +00:00
|
|
|
In order to simplify the creation of such environments, Authelia comes with a concept of
|
|
|
|
[Suites] that basically act as virtual environments for running either
|
|
|
|
manual or integration tests.
|
2018-08-26 21:46:15 +00:00
|
|
|
|
2019-03-02 23:25:40 +00:00
|
|
|
Please read the documentation related to [Suites] in order to discover
|
|
|
|
how to run related tests.
|
2018-08-26 21:46:15 +00:00
|
|
|
|
|
|
|
|
2019-03-02 23:25:40 +00:00
|
|
|
[Suites]: ./suites.md
|