Skip to content

add macos to ci #1121

add macos to ci

add macos to ci #1121

Workflow file for this run

name: ci
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
on:
pull_request:
push:
schedule:
- cron: '0 1 * * *'
env:
BUNDLE_RETRY: 6
BUNDLE_JOBS: 4
jobs:
macos-specs:
timeout-minutes: 30
runs-on: macos-14
steps:
- uses: actions/checkout@v4
- name: Set up Docker
run: |
brew install docker docker-compose colima
mkdir -p ~/.docker/cli-plugins
ln -sfn /opt/homebrew/opt/docker-compose/bin/docker-compose ~/.docker/cli-plugins/docker-compose
brew services start colima
mkdir -p ~/.docker
echo '{"cliPluginsExtraDirs": ["/opt/homebrew/lib/docker/cli-plugins"]}' > ~/.docker/config.json
# Wait for Colima to be ready
for i in {1..120}; do
colima status || true
if colima status > /dev/null 2>&1; then
break
fi
echo "Waiting for Colima to be ready... ($i/30)"
sleep 2
done
# Set Docker socket location
export DOCKER_HOST="unix://${HOME}/.colima/default/docker.sock"
echo "DOCKER_HOST=unix://${HOME}/.colima/default/docker.sock" >> $GITHUB_ENV
# Verify Docker is working
docker ps
- name: Start Kafka with docker compose
run: |
docker compose up -d || (sleep 5 && docker compose up -d)
- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: '3.3' # Using latest stable Ruby version
bundler-cache: true
- name: Run all specs
run: |
set -e
bundle install --path vendor/bundle
cd ext && bundle exec rake
cd ..
bundle exec rspec