.github/workflows/main.yml in amqp-client-1.1.4 vs .github/workflows/main.yml in amqp-client-1.1.5

- old
+ new

@@ -2,55 +2,61 @@ on: [push,pull_request] jobs: tests: + name: >- + ${{ matrix.ruby }} (sudo: ${{ matrix.sudo }}) runs-on: ubuntu-latest - timeout-minutes: 5 - services: - rabbitmq: - image: rabbitmq:latest - ports: - - 5672/tcp - # needed because the rabbitmq container does not provide a healthcheck - options: >- - --health-cmd "rabbitmqctl node_health_check" - --health-interval 10s - --health-timeout 5s - --health-retries 5 + timeout-minutes: 10 strategy: fail-fast: false matrix: - ruby: ['2.6', '2.7', '3.0', '3.1'] + sudo: [true] + ruby: + - "2.6" + - "2.7" + - "3.0" + - "3.1" + - "3.2" + - "3.3" include: - - { ruby: jruby, allow-failure: true } - - { ruby: truffleruby, allow-failure: true } + - { ruby: jruby, allow-failure: true, sudo: false } + - { ruby: truffleruby, allow-failure: true, sudo: false } steps: - - uses: actions/checkout@v2 - - name: Set up Ruby - uses: ruby/setup-ruby@v1 + - name: Install RabbitMQ + run: sudo apt-get update && sudo apt-get install -y rabbitmq-server + - name: Verify RabbitMQ started correctly + run: while true; do sudo rabbitmq-diagnostics status 2>/dev/null && break; echo -n .; sleep 2; done + - uses: actions/checkout@v4 + - uses: ruby/setup-ruby@v1 with: bundler-cache: true ruby-version: ${{ matrix.ruby }} - name: Run tests (excluding TLS tests) continue-on-error: ${{ matrix.allow-failure || false }} run: bundle exec rake env: - AMQP_PORT: ${{ job.services.rabbitmq.ports[5672] }} + RUN_SUDO_TESTS: ${{ matrix.sudo }} + tls: runs-on: ubuntu-latest - timeout-minutes: 5 + timeout-minutes: 10 strategy: fail-fast: false matrix: - ruby: ['3.0', 'jruby', 'truffleruby'] + ruby: + - "ruby" # latest stable release + - "jruby" + - "truffleruby" steps: - name: Install RabbitMQ run: sudo apt-get update && sudo apt-get install -y rabbitmq-server - name: Stop RabbitMQ run: sudo systemctl stop rabbitmq-server - + - name: Set up Homebrew + uses: Homebrew/actions/setup-homebrew@master - name: Install github.com/FiloSottile/mkcert run: brew install mkcert - name: Create local CA run: sudo CAROOT=/etc/rabbitmq $(brew --prefix)/bin/mkcert -install - name: Create certificate @@ -67,35 +73,34 @@ EOF - name: Start RabbitMQ run: sudo systemctl start rabbitmq-server - name: Verify RabbitMQ started correctly run: while true; do sudo rabbitmq-diagnostics status 2>/dev/null && break; echo -n .; sleep 2; done - - - uses: actions/checkout@v2 - - name: Set up Ruby - uses: ruby/setup-ruby@v1 + - uses: actions/checkout@v4 + - uses: ruby/setup-ruby@v1 with: bundler-cache: true ruby-version: ${{ matrix.ruby }} - name: Run TLS tests run: bundle exec rake env: TESTOPTS: --name=/_tls$/ + macos: runs-on: macos-latest - timeout-minutes: 5 + timeout-minutes: 10 strategy: fail-fast: false matrix: - ruby: ['3.0'] + ruby: # enough to test one Ruby on macOS + - "ruby" # latest stable release steps: - name: Install RabbitMQ run: brew install rabbitmq - name: Start RabbitMQ run: brew services start rabbitmq - - uses: actions/checkout@v2 - - name: Set up Ruby - uses: ruby/setup-ruby@v1 + - uses: actions/checkout@v4 + - uses: ruby/setup-ruby@v1 with: bundler-cache: true ruby-version: ${{ matrix.ruby }} - name: Verify RabbitMQ started correctly run: while true; do rabbitmq-diagnostics status 2>/dev/null && break; echo -n .; sleep 2; done