From aba2011d6c1ae2a0ae745b5d71bef77aa42180cc Mon Sep 17 00:00:00 2001 From: Gary Wilber <41303831+GaryWilber@users.noreply.github.com> Date: Fri, 20 Jan 2023 16:49:59 -0800 Subject: [PATCH] Add Windows and Mac to CI workflow (#998) --- .github/workflows/test.yml | 32 ++++++++++++++++++++++++-------- win_install.bat | 9 --------- win_install.ps1 | 2 ++ 3 files changed, 26 insertions(+), 17 deletions(-) delete mode 100644 win_install.bat create mode 100644 win_install.ps1 diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 468552aa..f586eb9c 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -1,4 +1,4 @@ -name: Test node-rdkafka +name: Build & Test on: push: @@ -10,16 +10,32 @@ jobs: build: strategy: matrix: - version: [14, 16, 18, 19] - runs-on: ubuntu-latest + node: [14, 16, 18, 19] + os: [ubuntu-22.04] + include: + # single mac test due to minute multipliers + # https://docs.github.com/en/billing/managing-billing-for-github-actions/about-billing-for-github-actions + - node: 18 + os: macos-12 + # single windows test due to node.js 14 node-gyp / vs 2022 issues + - node: 18 + os: windows-2022 + runs-on: ${{ matrix.os }} steps: - uses: actions/checkout@v3 with: submodules: recursive - - uses: actions/setup-node@v3 + - name: Install Node ${{ matrix.node }} in ${{ runner.os }} + uses: actions/setup-node@v3 with: - node-version: ${{ matrix.version }} + node-version: ${{ matrix.node }} cache: "npm" - - run: npm ci - - run: npm test - name: test + - name: Install Windows packages + if: runner.os == 'Windows' + run: ./win_install.ps1 + - name: Build + run: npm ci + # skipping on windows for now due to Make / mocha exit code issues + - name: Test + if: runner.os != 'Windows' + run: npm test diff --git a/win_install.bat b/win_install.bat deleted file mode 100644 index a0229c93..00000000 --- a/win_install.bat +++ /dev/null @@ -1,9 +0,0 @@ -@echo off -choco install openssl.light -REM if /i %TRAVIS_NODE_VERSION% gtr 6 ( -REM npm install --global --production windows-build-tools -REM ) else ( -REM npm install --global --production windows-build-tools@3.1.0 -REM ) - -choco install make \ No newline at end of file diff --git a/win_install.ps1 b/win_install.ps1 new file mode 100644 index 00000000..93a3be51 --- /dev/null +++ b/win_install.ps1 @@ -0,0 +1,2 @@ +choco install openssl.light +choco install make