{"id":13684576,"url":"https://github.com/PaulRosset/previs","last_synced_at":"2025-05-01T00:32:04.533Z","repository":{"id":84207454,"uuid":"147505634","full_name":"PaulRosset/previs","owner":"PaulRosset","description":"🎯 Testing your project locally in a clean environment.","archived":false,"fork":false,"pushed_at":"2019-08-23T09:11:25.000Z","size":95,"stargazers_count":325,"open_issues_count":3,"forks_count":8,"subscribers_count":5,"default_branch":"master","last_synced_at":"2024-08-03T14:07:47.359Z","etag":null,"topics":["ci","continuous-testing","devops","devops-tools","docker","local","test"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/PaulRosset.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null}},"created_at":"2018-09-05T11:12:16.000Z","updated_at":"2024-05-30T09:22:20.000Z","dependencies_parsed_at":"2023-05-23T23:30:45.274Z","dependency_job_id":null,"html_url":"https://github.com/PaulRosset/previs","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PaulRosset%2Fprevis","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PaulRosset%2Fprevis/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PaulRosset%2Fprevis/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PaulRosset%2Fprevis/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/PaulRosset","download_url":"https://codeload.github.com/PaulRosset/previs/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":224230569,"owners_count":17277372,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["ci","continuous-testing","devops","devops-tools","docker","local","test"],"created_at":"2024-08-02T14:00:35.101Z","updated_at":"2024-11-12T06:30:17.132Z","avatar_url":"https://github.com/PaulRosset.png","language":"Go","readme":"\u003ch1 align=\"center\"\u003e\n\t\u003cbr\u003e\n\t\u003cimg width=\"160\" src=\"https://rawgit.com/PaulRosset/previs/master/media/logo.png\" alt=\"previs\"\u003e\n\t\u003cbr\u003e\n\t\u003cbr\u003e\n\t\u003cbr\u003e\n\u003c/h1\u003e\n\n# Previs\n\n\u003e 🎯 Use Travis configuration to run stuff locally in a clean environment. \n\n[![Travis CI Build Status](https://api.travis-ci.com/PaulRosset/previs.svg?branch=master)](https://travis-ci.org/PaulRosset/previs)\n[![Snap Status](https://build.snapcraft.io/badge/PaulRosset/previs.svg)](https://build.snapcraft.io/user/PaulRosset/previs)\n[![Previs latest version](https://img.shields.io/badge/dynamic/json.svg?label=Previs\u0026url=https%3A%2F%2Fapi.github.com%2Frepos%2FPaulRosset%2Fprevis%2Freleases%2Flatest\u0026query=%24.tag_name\u0026colorB=blue)](https://github.com/PaulRosset/previs/releases)\n\n### Motivation\n\n\u003e Your very own local way of testing!\n\nPrevis is using the travis configuration mechanism to provide your own local service of continuous integration.\nNo more accidental error that trigger a fail build, no more plumbing on your git history.\nBut more than a local travis, it provides you a way of testing in a sandboxed environment and more...\n\nPrevis is also providing a way to run things in a clean environment with no side effect thank's to Docker.\n\n**Previs** is still in active development.\n\n### Installation\n\nPrevis is using docker at his heart, so of course you will need the docker daemon.  \nOne of the simplest way to install it, it's by using the bash script:\n```\n$\u003e curl -fsSL get.docker.com -o get-docker.sh\n$\u003e sh get-docker.sh\n```\n\nIf you are on Mac, it's [here](https://docs.docker.com/docker-for-mac/install/#install-and-run-docker-for-mac)\n\nYou may have some trouble with permissions when attempting to run docker, if so, run the following command:\n`sudo usermod -a -G docker $USER`  \nIf the issue still persists, reboot your system.\n\n#### [Snap packager](https://snapcraft.io/) for Linux users\n\n**Previs** is snapped. He is using [snapcraft](https://docs.snapcraft.io/) which made very easy to install on linux system. The snapped software are updated automatically.  \nYou have to run two commands and you will be ready to use **Previs**:\n\n- `$\u003e sudo apt install snapd`\n- `$\u003e sudo snap install previs`\n\nAs mentionned in [!8](https://github.com/PaulRosset/previs/pull/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:\n- `$\u003e sudo snap install --edge previs`  \nHowever if you want the latest release (0.5.0) with the official travis image:  \n- `$\u003e sudo snap install --beta previs`\n\nFor others package manager [see](https://docs.snapcraft.io/core/install).\n\n\u003e Snap binary are located in `/snap/bin/`, make sure it is integrated in your $PATH env.\n\n#### For others users\n\nIf 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](https://golang.org/doc/install) first, then by doing:\n\n- `$\u003e go get -v github.com/PaulRosset/previs`\n\nThen make sure that your env variable $PATH contain the path where the go binary live.\n\nOr you can still download the binary of release.\n\n### How to use Previs\n\nPrevis is simple to use, he is using the travis mechanism to run 'things' in a clean environment.\n\nHowever, 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`.\n\nOnce you are at the root of your repository where the `.travis.yml` or `.previs.yml` is, you can launch:\n\n`$\u003e previs [-p]`\n\nThe `-p` command indicate to previs to take the configuration of the `.previs.yml` instead of the `.travis.yml`.\n\n**!IMPORTANT**  \nGo find out how Previs work right now and know more what you can do before using it, by checking out our [Wiki](https://github.com/PaulRosset/previs/wiki/Previs-Docs)\n\nPrevis understand a failed build when the program ran is returning other than the **0** exit code.\n\n### Testing\n\nConcerning 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.  \nTo understand it, you can check out the `.travis.yml` file that serve th is purpose.\n\nOn the other hand, for the configuration parsing of Travis mechanism, we have a package [travis](https://github.com/PaulRosset/previs/tree/master/travis) that is only doing this purpose and where some tests resides.\n\n### Contribute\n\nAny contributions is very welcomed, let's do something bigger and stronger together!\n\nPoints that will be improved:\n- Improve the way of the docker images are wrote before build\n- Adding support for more commands\n- Clean when aborting via SIGNALs\n\n### License \n\n**MIT**  \nPaul Rosset\n","funding_links":[],"categories":["Go","List of Continuous Integration services"],"sub_categories":["Introduction"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FPaulRosset%2Fprevis","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FPaulRosset%2Fprevis","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FPaulRosset%2Fprevis/lists"}