Skip to content

n3xtcoder/nc-devops-test

Repository files navigation

N3XTCODER Devops Test

  • This repository contains code for a basic API with users and authentication.
  • It has automated end to end tests which prove the authentication works
  • These tests require a postgres database (otherwise they wouldn't be end to end)

The assignement

Configure Continuous Integration for the API

  • It must run the tests and fail if they fail (commands below)
  • Use a tool, provider, or service of your choice
  • It should run a DB to support the test run (docker exaample included)
  • Submit your work in the form of configuration files, scripts, etc (preferably via git)
  • If the submition is successful, then you will be asked to demonstrate the pipeline in an interview

Running the tests locally (OSX)

  1. Install dependencies
npm install
  1. Start a local DB (example via docker-compose)
docker-compose -f db.docker-compose.yml up
  1. Run the test command (setting some environmental variables, with the port from the docker compose example shown here)
API_BASE_PATH=/api API_SECRET=foo DB_URL=postgres://test:password@127.0.0.1:15432/test npm run test

Goals

  1. We want to know why you made certain choices such as splitting this up over multiple tasks/stages vs using a single task or stage
  2. We want to know that you understand every line of code and docs you submit
  3. Keep it simple: This task can be delivered in 1-4h depending on your approach and experience. We are not expecting you to install the latest and greatest new tool from scratch or learn a new hyped technology, but rather use things you know and use every day.
  4. Infrastructure as code please (minimise click+point setup)

Bonus

The code given here is by no means production ready and has some deliberate oversights. Point out any of these which are clear to you (things like failing to follow best practices, or security concerns).

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published