This repository has been archived by the owner on Apr 29, 2024. It is now read-only.
forked from zendesk/ruby-kafka
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
2813587 Replace CircleCI with GitHub Actions
- Loading branch information
1 parent
016286e
commit 20de03f
Showing
1 changed file
with
55 additions
and
0 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
name: Test and Build | ||
on: | ||
push: | ||
|
||
jobs: | ||
test_and_build: | ||
runs-on: ubuntu-latest | ||
env: | ||
BUNDLE_RUBYGEMS__PKG__GITHUB__COM: ${{ secrets.GITHUB_TOKEN }} | ||
RAILS_ENV: test | ||
KAFKA_ZOOKEEPER_CONNECT: "localhost:2181" | ||
KAFKA_ADVERTISED_LISTENERS: "PLAINTEXT://localhost:9092" | ||
KAFKA_OFFSETS_TOPIC_REPLICATION_FACTOR: 1 | ||
KAFKA_GROUP_INITIAL_REBALANCE_DELAY_MS: 0 | ||
KAFKA_CONFLUENT_LICENSE_TOPIC_REPLICATION_FACTOR: 1 | ||
KAFKA_TRANSACTION_STATE_LOG_MIN_ISR: 1 | ||
KAFKA_TRANSACTION_STATE_LOG_REPLICATION_FACTOR: 1 | ||
SCHEMA_REGISTRY_KAFKASTORE_CONNECTION_URL: "localhost:2181" | ||
SCHEMA_REGISTRY_HOST_NAME: "localhost" | ||
SCHEMA_REGISTRY_LISTENERS: "http://0.0.0.0:8081" | ||
ZOOKEEPER_CLIENT_PORT: 2181 | ||
KAFKA_BROKERS: localhost:9092 | ||
KAFKA_TOPIC_NAMESPACE: rspec | ||
AVRO_SCHEMA_REGISTRY_URL: http://localhost:8081 | ||
ZOO_PORT: 2181 | ||
ZOOKEEPER_SASL_ENABLED: false | ||
steps: | ||
# https://github.com/confluentinc/cp-all-in-one/blob/5.5.1-post/cp-all-in-one-community/docker-compose.yml | ||
- name: Run Confluent Platform (Confluent Server) | ||
uses: ybyzek/[email protected] | ||
with: | ||
type: cp-all-in-one-community | ||
github branch version: 5.5.1-post | ||
- name: checkout | ||
uses: actions/[email protected] | ||
- name: setup ruby | ||
uses: ruby/setup-ruby@v1 | ||
with: | ||
bundler-cache: true # runs 'bundle install' and caches installed gems automatically | ||
|
||
- name: bundler | ||
shell: bash | ||
run: |- | ||
gem install bundler | ||
bundle config path vendor/bundle | ||
bundle install --jobs 4 --retry 3 | ||
- name: specs | ||
shell: bash | ||
run: |- | ||
# Run specs to ensure build is passing | ||
bundle exec rspec --profile --tag functional spec/functional | ||
# Run rake build to ensure gem will build | ||
bundle exec rake build |