diff --git a/.github/workflows/integration-tests.yml b/.github/workflows/integration-tests.yml index 9e3da92ab..b1f723fef 100644 --- a/.github/workflows/integration-tests.yml +++ b/.github/workflows/integration-tests.yml @@ -15,7 +15,7 @@ env: branches: - '**' jobs: - build-and-run-tests: + linux-integration-tests: strategy: fail-fast: false matrix: @@ -52,3 +52,53 @@ jobs: CCM_IS_SCYLLA: "true" CCM_PATH: "./scylla-ccm" run: npm run integration + macos-integration-tests: + strategy: + fail-fast: false + matrix: + settings: + - host: macos-15-intel + target: x86_64-apple-darwin + build: npm run build -- --target x86_64-apple-darwin + name: Build and run integration tests - ${{ matrix.settings.target }} - node@20 + runs-on: ${{ matrix.settings.host }} + timeout-minutes: 30 + steps: + - uses: actions/checkout@v4 + - uses: ./.github/setup + with: + host: ${{ matrix.settings.host }} + target: ${{ matrix.settings.target }} + - uses: actions/setup-java@v4 + with: + distribution: 'temurin' + java-version: '8' + - name: Install ccm + # We need a copy of the repo for the ssl tests. + # When installing ccm as a package, we do not save the certificates, + # that are present in the ./ssl directory + run: | + git clone https://github.com/scylladb/scylla-ccm.git + python3 -m venv ./venv + source ./venv/bin/activate + pip install https://github.com/adespawn/scylla-ccm/archive/macos-proper-fix.zip + - name: Enable interfaces + # We need to manually enable the interfaces on macos + # https://github.com/scylladb/scylla-ccm?tab=readme-ov-file#requirements + run: | + sudo ifconfig lo0 alias 127.0.0.2 up + sudo ifconfig lo0 alias 127.0.0.3 up + sudo ifconfig lo0 alias 127.0.0.4 up + sudo ifconfig lo0 alias 127.0.0.5 up + sudo ifconfig lo0 alias 127.0.0.6 up + - name: Build + run: ${{ matrix.settings.build }} + shell: bash + - name: Run integration tests on cassandra + env: + CUSTOM_JAVA_HOME: __USE_JAVA_IN_PATH__ + CCM_IS_SCYLLA: "false" + CCM_PATH: "./scylla-ccm" + run: | + source ./venv/bin/activate + npm run integration diff --git a/package.json b/package.json index 2d557a8df..f7f2c76ca 100644 --- a/package.json +++ b/package.json @@ -20,7 +20,8 @@ "napi": { "binary-name": "scylladb-driver-alpha", "targets": [ - "x86_64-unknown-linux-gnu" + "x86_64-unknown-linux-gnu", + "x86_64-apple-darwin" ] }, "repository": {