From 61b0d9f578ad2da94b86d42ab8a0a1b478619f9c Mon Sep 17 00:00:00 2001 From: Hamza REMMAL Date: Sat, 13 Jul 2024 17:33:58 +0200 Subject: [PATCH] Add test workflow for the msi package --- .github/workflows/ci.yaml | 7 +++++-- .github/workflows/test-msi.yml | 34 ++++++++++++++++++++++++++++++++++ 2 files changed, 39 insertions(+), 2 deletions(-) create mode 100644 .github/workflows/test-msi.yml diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 74c4741c1ab4..84cd002cb7df 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -1011,5 +1011,8 @@ jobs: build-msi-package: uses: ./.github/workflows/build-msi.yml - if : github.event_name == 'pull_request' && contains(github.event.pull_request.body, '[test_msi]') - # TODO: ADD A JOB THAT DEPENDS ON THIS TO TEST THE MSI + + test-msi-package: + uses : ./.github/workflows/test-msi.yml + if : github.event_name == 'pull_request' && contains(github.event.pull_request.body, '[test_msi]') + needs: build-msi-package diff --git a/.github/workflows/test-msi.yml b/.github/workflows/test-msi.yml new file mode 100644 index 000000000000..0d99f496b5ed --- /dev/null +++ b/.github/workflows/test-msi.yml @@ -0,0 +1,34 @@ +################################################################################################### +### THIS IS A REUSABLE WORKFLOW TO TEST SCALA MSI ### +### HOW TO USE: ### +### ### +### NOTE: ### +### ### +################################################################################################### + +name: Test the MSI package + +on: + workflow_call: + +jobs: + test: + runs-on: windows-latest + steps: + - name: Fetch the MSI package from GitHub Artifacts + uses: actions/download-artifact@v4 + with: + name: scala.msi + - name : Install Scala from the MSI Package + run : | + Start-Process msiexec -ArgumentList "/i scala.msi /qn /passive /quiet" -NoNewWindow -Wait + shell: pwsh + - name : Check that the `scala` command is available + run : scala --version + shell: cmd + - name : Check that the `scalac` command is available + run : scalac --version + shell: cmd + - name : Check that the `scaladoc` command is available + run : scaladoc --version + shell: cmd