Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/rymndhng/lein-vcs-test
Run tests only when fils have changed (from version control)
https://github.com/rymndhng/lein-vcs-test
Last synced: 30 days ago
JSON representation
Run tests only when fils have changed (from version control)
- Host: GitHub
- URL: https://github.com/rymndhng/lein-vcs-test
- Owner: rymndhng
- License: epl-1.0
- Created: 2016-10-14T15:11:09.000Z (about 8 years ago)
- Default Branch: master
- Last Pushed: 2016-11-01T05:21:44.000Z (about 8 years ago)
- Last Synced: 2024-11-29T16:00:50.112Z (about 1 month ago)
- Language: Clojure
- Homepage:
- Size: 15.6 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# lein-vcs-test
A Leiningen plugin to filter files consumed in linting and testing based on
changes in version control.Inspired by `arc diff` in Phabricator's arcanist command.
## Motivation
When working with larger repositories, you will have many namespaces. Most of
the time, your fixes do not touch all the namespaces. Linting and testing the
entire project can take a long time. Instead, we should have the ability to only
lint and test files that have changed (i.e. for a pull request builder).lein-vcs-test uses the underlying vcs system to determine which files have been
touched compared to a commit-base (by default `master`). lein-vcs-test tries to
find test namespaces that correspond to these changed clojure files.## Installation
Put `[lein-vcs-test "0.1.0"]` into the `:plugins` vector of your project.clj.
## Usage
This plugin hooks into the existing lein test by adding a custom selector. To
run tests that have only changed since the commit-base, use:lein test :vcs
This also has support for the eastwood linter. To enable this feature
(regardless of selector), add the following entry to eastwood's configuration:``` clojure
(defproject myproject
:eastwood {:lein-vcs-test/enabled true}
)
```## Configuration
By default, the commit-base is set to "master". You can change this by setting a custom commit-base.
``` clojure
(defproject myproject
:plugins [[lein-vcs-test "0.1.1"]]
:vcs-test {:commit-base "develop"})
```## License
Copyright © 2016 rymndhng
Distributed under the Eclipse Public License either version 1.0 or (at
your option) any later version.