Skip to content

Commit

Permalink
ensure we run tests on ci
Browse files Browse the repository at this point in the history
  • Loading branch information
Mpdreamz committed Dec 2, 2024
1 parent 7484ccf commit cc27128
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 4 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ jobs:
env:
NUGET_AUTH_TOKEN: ${{secrets.GITHUB_TOKEN}}

- run: ./build.sh build -s true
- run: ./build.sh test
name: Build
- run: ./build.sh generatepackages -s true
name: Generate local nuget packages
Expand Down
6 changes: 4 additions & 2 deletions build/scripts/CommandLine.fs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@ open Microsoft.FSharp.Reflection
type Arguments =
| [<CliPrefix(CliPrefix.None);SubCommand>] Clean
| [<CliPrefix(CliPrefix.None);SubCommand>] Build

| [<CliPrefix(CliPrefix.None);SubCommand>] Test

| [<CliPrefix(CliPrefix.None);Hidden;SubCommand>] PristineCheck
| [<CliPrefix(CliPrefix.None);Hidden;SubCommand>] GeneratePackages
| [<CliPrefix(CliPrefix.None);Hidden;SubCommand>] ValidatePackages
Expand All @@ -28,7 +29,8 @@ with
member this.Usage =
match this with
| Clean -> "clean known output locations"
| Build -> "Run build and tests"
| Build -> "Run build"
| Test -> "Run build and tests"
| Release -> "runs build, and create an validates the packages shy of publishing them"
| Publish -> "Runs the full release"

Expand Down
5 changes: 4 additions & 1 deletion build/scripts/Targets.fs
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,8 @@ let private clean (arguments:ParseResults<Arguments>) =

let private build (arguments:ParseResults<Arguments>) = exec "dotnet" ["build"; "-c"; "Release"] |> ignore

let private test (arguments:ParseResults<Arguments>) = exec "dotnet" ["test"; "-c"; "Release"] |> ignore

let private pristineCheck (arguments:ParseResults<Arguments>) =
match Information.isCleanWorkingCopy "." with
| true -> printfn "The checkout folder does not have pending changes, proceeding"
Expand Down Expand Up @@ -141,7 +143,8 @@ let Setup (parsed:ParseResults<Arguments>) (subCommand:Arguments) =

step Clean.Name clean
cmd Build.Name None (Some [Clean.Name]) <| fun _ -> build parsed

cmd Test.Name None (Some [Build.Name]) <| fun _ -> test parsed

step PristineCheck.Name pristineCheck
step GeneratePackages.Name generatePackages
step ValidatePackages.Name validatePackages
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -168,6 +168,8 @@ private static void ExecuteBinaryInternal(EphemeralClusterConfiguration config,
ConsoleOutWriter = new ConsoleOutColorWriter(),
};

writer.WriteDiagnostic($"{binary} {string.Join(" ", arguments)}");

var result = Proc.Start(processStartArguments);

if (!result.Completed)
Expand Down
1 change: 1 addition & 0 deletions src/Elastic.Elasticsearch.Managed/ElasticsearchNode.cs
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,7 @@ public IDisposable SubscribeLines(IConsoleLineHandler writer, Action<LineOut> on
var node = NodeConfiguration.DesiredNodeName;
writer?.WriteDiagnostic($"Elasticsearch location: [{Binary}]", node);
writer?.WriteDiagnostic($"Settings: {{{string.Join(" ", NodeConfiguration.CommandLineArguments)}}}", node);
writer?.WriteDiagnostic($"Environment: {{{string.Join(" ", StartArguments.Environment)}}}", node);

var envVarName = NodeConfiguration.Version.InRange("<7.12.0") ? "JAVA_HOME" : "ES_JAVA_HOME";
var javaHome = Environment.GetEnvironmentVariable(envVarName);
Expand Down

0 comments on commit cc27128

Please sign in to comment.