This repository has been archived by the owner on Apr 29, 2024. It is now read-only.
2813587 Replace CircleCI with GitHub Actions #1
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: 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 |