This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
defmodule Mix.Tasks.Test do | |
use Mix.Task | |
@shortdoc "Run a project's tests" | |
@moduledoc """ | |
Run the tests for a project. | |
This task will preload the `test/test_helper.exs` which | |
should do all testing setup and then require all files |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'simplecov' | |
require 'coveralls' | |
# writes out a "coverage/raw" file to be read by Vim | |
class RawMissingLinesFormatter | |
def format(result) | |
File.open('coverage/raw', 'w') { |raw| | |
result.source_files.each do |file| | |
file.lines.each do |line| | |
if line.missed? |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ pkgs ? import <nixpkgs> {} }: | |
with pkgs; | |
let | |
su_exec = pkgs.stdenv.mkDerivation { | |
name = "su-exec-0.2"; | |
src = fetchurl { | |
url = https://github.com/ncopa/su-exec/archive/v0.2.tar.gz; | |
sha256 = "09ayhm4w7ahvwk6wpjimvgv8lx89qx31znkywqmypkp6rpccnjpc"; |