<commit_before>///////////////////////////////////////////////////////////////////////////////
// GLOBAL VARIABLES
///////////////////////////////////////////////////////////////////////////////
var isLocalBuild        = !AppVeyor.IsRunningOnAppVeyor;
var packPath            = Directory("./src/AB.Extensions");
var sourcePath          = Directory("./src/AB.Extensions");
var testsPath           = Directory("test/AB.Extensions.Tests");
var buildArtifacts      = Directory("./artifacts/packages");
var configuration   = Argument<string>("configuration", "Release");

//////////////////////////////////////////////////////////////////////
// ARGUMENTS
//////////////////////////////////////////////////////////////////////

var target = Argument("target", "Default");

//////////////////////////////////////////////////////////////////////
// PREPARATION
//////////////////////////////////////////////////////////////////////


//////////////////////////////////////////////////////////////////////
// TASKS
//////////////////////////////////////////////////////////////////////

Task("Build")
    .IsDependentOn("Clean")
    //.IsDependentOn("Version")
    .IsDependentOn("Restore")
    .Does(() => {
	var settings = new DotNetCoreBuildSettings 
        {
            Configuration = configuration
            // Runtime = IsRunningOnWindows() ? null : "unix-x64"
        };
        DotNetCoreBuild("./", settings);
    });

Task("Clean")
    .Does(() => 
	{
        CleanDirectories(new DirectoryPath[] { buildArtifacts });
    });

//Task("Restore")
//    .Does(() => 
//	{
//        DotNetCoreRestore("src");
//    });

Task("Restore")
    .Does(() =>
	{
	    var settings = new DotNetCoreRestoreSettings
	    {
	        Sources = new [] { "https://api.nuget.org/v3/index.json" }
	    };
	
	    DotNetCoreRestore("./", settings);
	    DotNetCoreRestore(testsPath, settings);
	});

Task("Default")
  .IsDependentOn("Build");
  //.IsDependentOn("RunTests")
  //.IsDependentOn("Pack");

RunTarget(target);<commit_msg>cake script uses unit tests<commit_after>///////////////////////////////////////////////////////////////////////////////
// GLOBAL VARIABLES
///////////////////////////////////////////////////////////////////////////////
var isLocalBuild        = !AppVeyor.IsRunningOnAppVeyor;
var packPath            = Directory("./src/AB.Extensions");
var sourcePath          = Directory("./src/AB.Extensions");
var testsPath           = Directory("./test/AB.Extensions.Tests");
var buildArtifacts      = Directory("./artifacts/packages");
var configuration   = Argument<string>("configuration", "Release");

//////////////////////////////////////////////////////////////////////
// ARGUMENTS
//////////////////////////////////////////////////////////////////////

var target = Argument("target", "Default");

//////////////////////////////////////////////////////////////////////
// PREPARATION
//////////////////////////////////////////////////////////////////////


//////////////////////////////////////////////////////////////////////
// TASKS
//////////////////////////////////////////////////////////////////////

Task("Build")
    .IsDependentOn("Clean")
    //.IsDependentOn("Version")
    .IsDependentOn("Restore")
    .Does(() => {
	var settings = new DotNetCoreBuildSettings 
        {
            Configuration = configuration
            // Runtime = IsRunningOnWindows() ? null : "unix-x64"
        };
        DotNetCoreBuild("./", settings);
    });

Task("Clean")
    .Does(() => 
	{
        CleanDirectories(new DirectoryPath[] { buildArtifacts });
    });

//Task("Restore")
//    .Does(() => 
//	{
//        DotNetCoreRestore("src");
//    });

Task("Restore")
    .Does(() =>
	{
	    var settings = new DotNetCoreRestoreSettings
	    {
	        Sources = new [] { "https://api.nuget.org/v3/index.json" }
	    };
	
	    DotNetCoreRestore("./", settings);
	    DotNetCoreRestore(testsPath, settings);
	});

Task("RunTests")
    .IsDependentOn("Restore")
    .IsDependentOn("Clean")
    .Does( () =>
	{   
		var settings = new DotNetCoreTestSettings { Configuration = configuration };
	    DotNetCoreTest("./test/AB.Extensions.Tests/AB.Extensions.Tests.csproj", settings);
	});

Task("Default")
  .IsDependentOn("Build")
  .IsDependentOn("RunTests");
  //.IsDependentOn("Pack");

RunTarget(target);
{'fraction_non_alphanumeric': 0.39360963185922665, 'fraction_numerical': 0.0013892104653855058, 'mean_word_length': 1.162162162162162, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 14, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '589198', 'n_tokens_mistral': 1064, 'n_tokens_neox': 1013, 'n_words': 159}