Skip to content

Commit f64c113

Browse files
committed
Add MacOS integration test CI workflow
This adds a new part of the CI workflow to run integration tests on intel MacOS with Cassandra CCM. Why not ScyllaDB? It's not supported on MacOS. What about #244? If this appears to be a problem, we can move this test to extended CI, where it will not hurt us so much to have a flaky test (especially if this is a decently rare chance to fail). What about M chips (arm)? The Java source we use for CCM does not support JAVA 8 on this platform. Using Java 11 causes CI to fail (ccm just never starts the nodes). (See: https://github.com/scylladb/nodejs-rs-driver/actions/runs/21636604746/job/62363768675). At some point I may try to search for a different Java provider, that does support this architecture. For now we limit ourselves to intel Macs only.
1 parent 3d498f6 commit f64c113

2 files changed

Lines changed: 53 additions & 2 deletions

File tree

.github/workflows/integration-tests.yml

Lines changed: 51 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ env:
1515
branches:
1616
- '**'
1717
jobs:
18-
build-and-run-tests:
18+
linux-integration-tests:
1919
strategy:
2020
fail-fast: false
2121
matrix:
@@ -52,3 +52,53 @@ jobs:
5252
CCM_IS_SCYLLA: "true"
5353
CCM_PATH: "./scylla-ccm"
5454
run: npm run integration
55+
macos-integration-tests:
56+
strategy:
57+
fail-fast: false
58+
matrix:
59+
settings:
60+
- host: macos-15-intel
61+
target: x86_64-apple-darwin
62+
build: npm run build -- --target x86_64-apple-darwin
63+
name: Build and run integration tests - ${{ matrix.settings.target }} - node@20
64+
runs-on: ${{ matrix.settings.host }}
65+
timeout-minutes: 30
66+
steps:
67+
- uses: actions/checkout@v4
68+
- uses: ./.github/setup
69+
with:
70+
host: ${{ matrix.settings.host }}
71+
target: ${{ matrix.settings.target }}
72+
- uses: actions/setup-java@v4
73+
with:
74+
distribution: 'temurin'
75+
java-version: '8'
76+
- name: Install ccm
77+
# We need a copy of the repo for the ssl tests.
78+
# When installing ccm as a package, we do not save the certificates,
79+
# that are present in the ./ssl directory
80+
run: |
81+
git clone https://github.com/scylladb/scylla-ccm.git
82+
python3 -m venv ./venv
83+
source ./venv/bin/activate
84+
pip install https://github.com/adespawn/scylla-ccm/archive/macos-proper-fix.zip
85+
- name: Enable interfaces
86+
# We need to manually enable the interfaces on macos
87+
# https://github.com/scylladb/scylla-ccm?tab=readme-ov-file#requirements
88+
run: |
89+
sudo ifconfig lo0 alias 127.0.0.2 up
90+
sudo ifconfig lo0 alias 127.0.0.3 up
91+
sudo ifconfig lo0 alias 127.0.0.4 up
92+
sudo ifconfig lo0 alias 127.0.0.5 up
93+
sudo ifconfig lo0 alias 127.0.0.6 up
94+
- name: Build
95+
run: ${{ matrix.settings.build }}
96+
shell: bash
97+
- name: Run integration tests on cassandra
98+
env:
99+
# CUSTOM_JAVA_HOME: __USE_JAVA_IN_PATH__
100+
CCM_IS_SCYLLA: "false"
101+
CCM_PATH: "./scylla-ccm"
102+
run: |
103+
source ./venv/bin/activate
104+
npm run integration

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,8 @@
2020
"napi": {
2121
"binary-name": "scylladb-driver-alpha",
2222
"targets": [
23-
"x86_64-unknown-linux-gnu"
23+
"x86_64-unknown-linux-gnu",
24+
"x86_64-apple-darwin"
2425
]
2526
},
2627
"repository": {

0 commit comments

Comments
 (0)