We have 2 env files,
.env
: Used for running the application.
.env.test
: Used for running specs.
The test environment uses a separate database, so when we reset the data during each test, we don’t modify our local data.
We have 3 environments
dev
: This is your development flow, the most common.
test
: This is triggered during pre-push checks locally before git push. Since dev servers may be running, we use a different port for test.
ci
: This is run on CircleCI. Uses same port as test, but we give it a separate name because some other configs may be different.