• Stars
    star
    325
  • Rank 129,350 (Top 3 %)
  • Language
    Go
  • License
    MIT License
  • Created over 6 years ago
  • Updated over 5 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

🎯 Testing your project locally in a clean environment.


previs


Previs

 🎯 Use Travis configuration to run stuff locally in a clean environment.

Travis CI Build Status Snap Status Previs latest version

Motivation

Your very own local way of testing!

Previs is using the travis configuration mechanism to provide your own local service of continuous integration. No more accidental error that trigger a fail build, no more plumbing on your git history. But more than a local travis, it provides you a way of testing in a sandboxed environment and more...

Previs is also providing a way to run things in a clean environment with no side effect thank's to Docker.

Previs is still in active development.

Installation

Previs is using docker at his heart, so of course you will need the docker daemon.
One of the simplest way to install it, it's by using the bash script:

$> curl -fsSL get.docker.com -o get-docker.sh
$> sh get-docker.sh

If you are on Mac, it's here

You may have some trouble with permissions when attempting to run docker, if so, run the following command: sudo usermod -a -G docker $USER
If the issue still persists, reboot your system.

Snap packager for Linux users

Previs is snapped. He is using snapcraft which made very easy to install on linux system. The snapped software are updated automatically.
You have to run two commands and you will be ready to use Previs:

  • $> sudo apt install snapd
  • $> sudo snap install previs

As mentionned in !8, we let the possibility to still install the previous (0.4.1) version with the lighter image, so if you want the lighter image with less features:

  • $> sudo snap install --edge previs
    However if you want the latest release (0.5.0) with the official travis image:
  • $> sudo snap install --beta previs

For others package manager see.

Snap binary are located in /snap/bin/, make sure it is integrated in your $PATH env.

For others users

If you run an other operating system or you don't want to install it via snap, you can still install it "manually" by installing Go first, then by doing:

  • $> go get -v github.com/PaulRosset/previs

Then make sure that your env variable $PATH contain the path where the go binary live.

Or you can still download the binary of release.

How to use Previs

Previs is simple to use, he is using the travis mechanism to run 'things' in a clean environment.

However, since we are running things locally, we can't reproduce everythings that Travis is providing, so when the .travis.yml get too complex, you have the possibility to switch on a custom file named .previs.yml, then previs will take the configuration of the .previs.yml.

Once you are at the root of your repository where the .travis.yml or .previs.yml is, you can launch:

$> previs [-p]

The -p command indicate to previs to take the configuration of the .previs.yml instead of the .travis.yml.

!IMPORTANT
Go find out how Previs work right now and know more what you can do before using it, by checking out our Wiki

Previs understand a failed build when the program ran is returning other than the 0 exit code.

Testing

Concerning the workflow of testing, rather than create unit tests on multiple call systems that already been tested especially docker calls, we instead run the program in real world use case to verify nothing broke and prevent regressions.
To understand it, you can check out the .travis.yml file that serve th is purpose.

On the other hand, for the configuration parsing of Travis mechanism, we have a package travis that is only doing this purpose and where some tests resides.

Contribute

Any contributions is very welcomed, let's do something bigger and stronger together!

Points that will be improved:

  • Improve the way of the docker images are wrote before build
  • Adding support for more commands
  • Clean when aborting via SIGNALs

License

MIT
Paul Rosset

More Repositories

1

linter-farch

Make sure the filenames stay the same, control them! πŸ‘
JavaScript
103
star
2

rehover

πŸ‘ React hovering on two elements made simpler!
JavaScript
76
star
3

go-hacknews

πŸ“Ÿ Tiny utility Go client for HackerNews API.
Go
17
star
4

subtitles-anywhere-web

Add your own SRT, VTT, SAMI, or TTML subtitles to your preferred service streaming web platform.
TypeScript
10
star
5

awesome-list-pretty

πŸ’…πŸ» πŸ•Ά Awesome List Prettied
Python
9
star
6

formidable-upload-koa

Koa middleware based on formidable uploader
JavaScript
7
star
7

git-aware

Fast Rust CLI that detects Git dirty working tree status on a system
Rust
4
star
8

reclick

Clicking Menu in React made simpler! πŸ‘†
JavaScript
4
star
9

var-env

🌿 Create persistent env variables easily and quickly for testing locally.
Go
4
star
10

EasyIP

β˜„οΈ CLI tool to get your Public/Internal Address IP easily and quickly with few features in more.
JavaScript
3
star
11

lightning-design

Some React component designed
JavaScript
2
star
12

refined-gitlab-canal

Refined Gitlab By Canal+
JavaScript
2
star
13

blog-kent

πŸ“– Blog Kent University / Epitech (Epikent) - Student - 2017/2018 - Paul Rosset
TypeScript
2
star
14

react-redux-boilerplate

⚑️ Simple React-Redux boilerplate with webpack devServer
JavaScript
1
star
15

messenger-bot-2

πŸ€–πŸ€– An advanced Messenger bot with natural language processing and strategies pattern.
JavaScript
1
star
16

opencloud-kent-front

OpenCloudPlatform, Kent university, UI, 2017/2018
JavaScript
1
star
17

promisified-aws-dyn

Abstract class promisified for AWS dynamodb SDK
JavaScript
1
star
18

messenger-bot

πŸ€– A nodejs Messenger Bot in 10 minutes
JavaScript
1
star
19

atom-easyip

πŸ’₯ Plugin based on easy-ip package and Atom editor to get your public/private IP address with few features in more.
JavaScript
1
star
20

morning-Knowing

Small web application to quickly check time and weather.
JavaScript
1
star
21

mediahelper

The Cyber Swiss Media Knife
TypeScript
1
star
22

ngshowon

A simple angular directive to show/hide element according to the size of the window.
JavaScript
1
star
23

j2c

πŸ›  CLI that transform a JSON to CSV with Key,Value format.
JavaScript
1
star