build(deps): bump actions/download-artifact in /.github/workflows #8
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: CI | |
on: | |
- push | |
- pull_request | |
jobs: | |
librdkafka: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Set up Ruby | |
uses: ruby/setup-ruby@v1 | |
with: | |
ruby-version: ruby | |
bundler-cache: true | |
- name: Build librdkafka extension | |
run: bundle exec rake ext | |
env: | |
MAKE: make -j3 | |
- name: Upload librdkafka | |
uses: actions/upload-artifact@v3 | |
with: | |
name: librdkafka.so | |
path: ext/librdkafka.so | |
retention-days: 1 | |
# Run Rubocop to make sure code confirms to the expected standard. | |
rubocop: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Set up Ruby | |
uses: ruby/setup-ruby@v1 | |
with: | |
ruby-version: ruby | |
bundler-cache: true | |
- name: Rubocop | |
run: bundle exec rubocop | |
ruby: | |
name: Ruby ${{ matrix.ruby }} | |
needs: librdkafka | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: false | |
matrix: | |
ruby: | |
- "2.7" | |
- "3.0" | |
- "3.1" | |
- "3.2" | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Set up Ruby | |
uses: ruby/setup-ruby@v1 | |
with: | |
ruby-version: ${{ matrix.ruby }} | |
bundler-cache: true | |
- name: Install kafkacat | |
run: | | |
mkdir -p $HOME/bin | |
echo "$HOME/bin" >> $GITHUB_PATH | |
# Use kafkacat from Docker to ensure a recent version is installed | |
docker pull edenhill/kafkacat:1.6.0 | |
echo 'docker run -i --rm --network=host edenhill/kafkacat:1.6.0 "$@"' > $HOME/bin/kafkacat | |
chmod +x $HOME/bin/kafkacat | |
# Run tests against the latest version of Kafka in spec/support | |
- name: Start Kafka | |
run: | | |
bundle exec rake kafka:up | |
# Block until Kafka is ready | |
$HOME/bin/kafkacat -L -b 127.0.0.1:9092 -t __consumer_offsets -m 20 -q > /dev/null | |
- uses: actions/[email protected] | |
with: | |
name: librdkafka.so | |
path: ext/ | |
- name: Run specs | |
uses: nick-invision/retry@v2 | |
with: | |
timeout_minutes: 5 | |
max_attempts: 3 | |
retry_on: error | |
command: bundle exec rake | |
kafka: | |
name: Kafka ${{ matrix.kafka }} | |
needs: librdkafka | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: false | |
matrix: | |
kafka: | |
- "2.8" | |
- "3.0" | |
- "3.1" | |
- "3.2" | |
- "3.3" | |
- "3.4" | |
- "3.5" | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Set up Ruby | |
uses: ruby/setup-ruby@v1 | |
with: | |
# Use the latest stable version of Ruby | |
ruby-version: ruby | |
bundler-cache: true | |
- name: Install kafkacat | |
run: | | |
mkdir -p $HOME/bin | |
echo "$HOME/bin" >> $GITHUB_PATH | |
# Use kafkacat from Docker to ensure a recent version is installed | |
docker pull edenhill/kafkacat:1.6.0 | |
echo 'docker run -i --rm --network=host edenhill/kafkacat:1.6.0 "$@"' > $HOME/bin/kafkacat | |
chmod +x $HOME/bin/kafkacat | |
# Run tests against the latest version of Kafka in spec/support | |
- name: Start Kafka | |
run: | | |
bundle exec rake kafka:up[${{ matrix.kafka }}] | |
# Block until Kafka is ready | |
$HOME/bin/kafkacat -L -b 127.0.0.1:9092 -t __consumer_offsets -m 20 -q > /dev/null | |
- uses: actions/[email protected] | |
with: | |
name: librdkafka.so | |
path: ext/ | |
- name: Run specs | |
uses: nick-invision/retry@v2 | |
with: | |
timeout_minutes: 5 | |
max_attempts: 3 | |
retry_on: error | |
command: bundle exec rake | |
redpanda: | |
name: Redpanda | |
needs: librdkafka | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: false | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Set up Ruby | |
uses: ruby/setup-ruby@v1 | |
with: | |
# Use the latest stable version of Ruby | |
ruby-version: ruby | |
bundler-cache: true | |
- name: Install kafkacat | |
run: | | |
mkdir -p $HOME/bin | |
echo "$HOME/bin" >> $GITHUB_PATH | |
# Use kafkacat from Docker to ensure a recent version is installed | |
docker pull edenhill/kafkacat:1.6.0 | |
echo 'docker run -i --rm --network=host edenhill/kafkacat:1.6.0 "$@"' > $HOME/bin/kafkacat | |
chmod +x $HOME/bin/kafkacat | |
# Run tests against the latest version of Kafka in spec/support | |
- name: Start Kafka | |
run: | | |
bundle exec rake kafka:up[redpanda] | |
# Block until Kafka is ready | |
$HOME/bin/kafkacat -L -b 127.0.0.1:9092 -t __consumer_offsets -m 20 -q > /dev/null | |
- uses: actions/[email protected] | |
with: | |
name: librdkafka.so | |
path: ext/ | |
- name: Run specs | |
uses: nick-invision/retry@v2 | |
with: | |
timeout_minutes: 5 | |
max_attempts: 3 | |
retry_on: error | |
command: bundle exec rake |