If you have forked this repo, then connect with Razorops to create your demo pipeline by following the below button
This is an example code to demonstrate how to create Docker-Compose based pipeline on Razorops.
It's a Ruby based implementation of TodoBackend Spec, which implements the API using Sinatra framework.
-
Use
bundle
to install the dependencies -bundle install
-
Migrate the database
export DATABASE_URL=postgres://<user>:<password>/<host>/<database> # replace accordingly bundle exec rake nuke_db
You can use sqlite, mysql or any sequel compatible database.
-
To start the server in development mode run -
export DATABASE_URL=postgres://.. bundle exec rake server
Run following commands to execute the rspec suite -
bundle exec rspec
To turn on coverage reports -
COVERAGE=true bundle exec rspec
Use can also use Docker-Compose based setup to bootstrap the project easily -
docker-compose build
docker-compose up -d
docker-compose exec -T web rake nuke_db
To execute the tests -
docker-compose exec -T web bundle exec rspec
If you're new to Razorops, feel free to fork this repository and use it to create a project.
.razorops.yaml
contains the pipeline code to build and execute the tests for this project. To know more about how to write and customize, refer to the documentation.
It uses Docker-Compose commands to bootstrap the containers and exec into web container to run the tests. Here is the link of the pipeline workflows page.
Copyright (c) 2021 Razorops LLC
Distributed under the MIT License. See the file LICENSE.md.