From 57918485031e35595bd76ffb40b07d7077104aca Mon Sep 17 00:00:00 2001 From: ncave <777696+ncave@users.noreply.github.com> Date: Sat, 14 Oct 2023 17:07:06 -0700 Subject: [PATCH] Separate CI job for standalone --- .github/workflows/build.yml | 18 ++++++++++++++++++ src/Fable.Build/Test/JavaScript.fs | 7 ++++--- src/Fable.Build/Test/Standalone.fs | 1 + 3 files changed, 23 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 0a055ea5ce..e856af805a 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -64,6 +64,24 @@ jobs: - name: Fable Tests run: ./build.sh test integration + # Separate build job for Standalone + build-standalone: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v2 + + - name: Setup .NET + uses: actions/setup-dotnet@v1 + with: + dotnet-version: '6.0.x' + + - name: Setup Node.js environment + uses: actions/setup-node@v2.4.1 + + - name: Fable Tests + run: ./build.sh test standalone + # Separate build job for Python since we use a test matrix (will run in parallell) build-python: runs-on: ubuntu-latest diff --git a/src/Fable.Build/Test/JavaScript.fs b/src/Fable.Build/Test/JavaScript.fs index 94c693bdf4..e2e2f91183 100644 --- a/src/Fable.Build/Test/JavaScript.fs +++ b/src/Fable.Build/Test/JavaScript.fs @@ -105,10 +105,11 @@ let private handleMainTests (isWatch: bool) (noDotnet: bool) = testReact false - let isCI = Environment.GetEnvironmentVariable("CI") |> Option.ofObj + // let isCI = Environment.GetEnvironmentVariable("CI") |> Option.ofObj - if isCI.IsSome then - Standalone.handleStandaloneFast () + // standalone will be tested by a separate CI job + // if isCI.IsSome then + // Standalone.handleStandaloneFast () let handle (args: string list) = let isReactOnly = args |> List.contains "--react-only" diff --git a/src/Fable.Build/Test/Standalone.fs b/src/Fable.Build/Test/Standalone.fs index fb355da7d6..07b8afbce4 100644 --- a/src/Fable.Build/Test/Standalone.fs +++ b/src/Fable.Build/Test/Standalone.fs @@ -47,4 +47,5 @@ let handleStandaloneFast () = Command.Run("npx", mochaCommand, workingDirectory = standaloneBuildDest) let handle (args: string list) = + BuildFableLibraryJavaScript().Run() handleStandaloneFast ()