diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index dd7ce98..30776c8 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -8,30 +8,18 @@ jobs: build: runs-on: ubuntu-22.04 - services: - rabbitmq: - image: rabbitmq:3.10 - # needed because the rabbitmq container does not provide a healthcheck - options: >- - --health-cmd "rabbitmq-diagnostics ping" - --health-interval 10s - --health-timeout 5s - --health-retries 5 - ports: - - 5672:5672 - strategy: fail-fast: false matrix: include: - - { ruby: 2.7.6 } - - { ruby: 3.0.4 } - - { ruby: 3.1.2 } + - { ruby: 3.2 } + - { ruby: 3.3 } + - { ruby: 3.4 } - { ruby: jruby-9.3.7.0, allow-failure: true } steps: - name: Checkout code - uses: actions/checkout@v3 + uses: actions/checkout@v6 - name: Setup Ruby ${{ matrix.ruby }} uses: ruby/setup-ruby@v1 @@ -39,6 +27,9 @@ jobs: ruby-version: ${{ matrix.ruby }} bundler-cache: true + - name: Run docker compose + run: docker compose up -d --wait --wait-timeout 30 + - name: Run tests run: bundle exec rake continue-on-error: ${{ matrix.allow-failure || false }} diff --git a/docker-compose.yml b/docker-compose.yml index 7cb578f..ff14aa6 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -1,7 +1,10 @@ -version: "3.8" - services: rabbitmq: - image: rabbitmq:3.10 + image: rabbitmq:4.2 ports: - 5672:5672 + healthcheck: + test: ["CMD", "rabbitmq-diagnostics", "ping"] + interval: 10s + timeout: 5s + retries: 5