From dbcfd7ee7740f4abc8c157e4a86b7c5bd80acfae Mon Sep 17 00:00:00 2001 From: Mal McKay Date: Sat, 25 Sep 2021 19:16:57 -0400 Subject: [PATCH] Move build to Github Actions (#104) --- .github/workflows/build.yml | 54 +++++++++++++++++++++++++++++++++++++ .travis.yml | 46 ------------------------------- README.markdown | 18 ++++++------- spec/zk/client_spec.rb | 2 +- 4 files changed, 64 insertions(+), 56 deletions(-) create mode 100644 .github/workflows/build.yml delete mode 100644 .travis.yml diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 0000000..8b14a53 --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,54 @@ +on: + pull_request: + branches: + - master + push: + branches: + - master + +jobs: + build: + name: Ruby ${{ matrix.ruby }} / GCC ${{ matrix.gcc }} / ${{ matrix.os }} + runs-on: ${{ matrix.os }} + strategy: + fail-fast: false + matrix: + os: + - ubuntu-latest + - macos-latest + ruby: + - 2.5 + - 2.6 + - 2.7 + - jruby-9.1.17.0 + - jruby + gcc: + - 7 + exclude: + - os: macos-latest + gcc: 7 + + steps: + - uses: actions/checkout@v2 + with: + submodules: recursive + + - name: Set up GCC + if: ${{ matrix.gcc != 'latest' }} + uses: egor-tensin/setup-gcc@v1 + with: + version: ${{ matrix.gcc }} + platform: x64 + + - name: Set up Ruby + uses: ruby/setup-ruby@v1 + with: + ruby-version: ${{ matrix.ruby }} + bundler-cache: true + + - name: Run Tests + env: + RAILS_ENV: test + SPAWN_ZOOKEEPER: true + run: | + bundle exec rake diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index a795625..0000000 --- a/.travis.yml +++ /dev/null @@ -1,46 +0,0 @@ -# This should kick us over to the docker system -sudo: false - -notifications: - email: - - slyphon@gmail.com - - eric@5stops.com - -env: - - SPAWN_ZOOKEEPER='true' - -# pull in releaseops submodule -before_install: - - gem update bundler - - git submodule update --init --recursive - -rvm: - - ree - - jruby-18mode - - jruby-19mode - - rbx-18mode - - rbx-19mode - - 1.8.7 - - 1.9.2 - - 1.9.3 - - 2.0.0 - - 2.1.0 - - 2.2.0 - - 2.3.6 - - 2.4.3 - - 2.5.0 -matrix: - allow_failures: - - rvm: ree - - rvm: jruby-18mode - - rvm: jruby-19mode - - rvm: rbx-18mode - - rvm: rbx-19mode - - rvm: 1.8.7 - - rvm: 2.5.0 - -# jruby specs are too intesive for travis -# - jruby-18mode -# - jruby-19mode - -bundler_args: --without development docs coverage diff --git a/README.markdown b/README.markdown index 0a75c4c..32cb535 100644 --- a/README.markdown +++ b/README.markdown @@ -1,10 +1,10 @@ # ZK # -[![Build Status (master)](https://secure.travis-ci.org/zk-ruby/zk.png?branch=master)](http://travis-ci.org/zk-ruby/zk) +![Build Status](https://github.com/zk-ruby/zk/actions/workflows/build.yml/badge.svg) -ZK is an application programmer's interface to the Apache [ZooKeeper][] server. It is based on the [zookeeper gem][] which is a multi-Ruby low-level driver. Currently MRI 1.8.7, 1.9.2, 1.9.3, REE, and JRuby are supported. Rubinius 2.0.testing is supported-ish (it's expected to work, but upstream is unstable, so YMMV). +ZK is an application programmer's interface to the Apache [ZooKeeper][] server. It is based on the [zookeeper gem][] which is a multi-Ruby low-level driver. Currently MRI 1.8.7, 1.9.2, 1.9.3, REE, and JRuby are supported. Rubinius 2.0.testing is supported-ish (it's expected to work, but upstream is unstable, so YMMV). -ZK is licensed under the [MIT][] license. +ZK is licensed under the [MIT][] license. The key place to start in the documentation is with ZK::Client::Base ([rubydoc.info][ZK::Client::Base], [local](/docs/ZK/Client/Base)). @@ -27,11 +27,11 @@ ZooKeeper is a multi-purpose tool that is designed to allow you to write code th One of the most useful aspects of ZooKeeper is the ability to set "[watches][]" on nodes. This allows one to be notified when a node has been deleted, created, changed, or has had its list of child znodes modified. The asynchronous nature of these watches enables you to write code that can _react_ to changes in your environment without polling and busy-waiting. -Znodes can be _ephemeral_, which means that when the connection that created them goes away, they're automatically cleaned up, and all the clients that were watching them are notified of the deletion. This is an incredibly useful mechanism for providing _presence_ in a cluster ("which of my thingamabobers are up?). If you've ever run across a stale pid file or lock, you can imagine how useful this feature can be. +Znodes can be _ephemeral_, which means that when the connection that created them goes away, they're automatically cleaned up, and all the clients that were watching them are notified of the deletion. This is an incredibly useful mechanism for providing _presence_ in a cluster ("which of my thingamabobers are up?). If you've ever run across a stale pid file or lock, you can imagine how useful this feature can be. Znodes can also be created as _sequence_ nodes, which means that beneath a given path, a node can be created with a given prefix and assigned a unique integer. This, along with the _ephemeral_ property, provide the basis for most of the coordination classes such as [groups][] and [locks][]. -ZooKeeper is easy to deploy in a [Highly Available][ha-config] configuration, and the clients natively understand the clustering and how to resume a session transparently when one of the cluster nodes goes away. +ZooKeeper is easy to deploy in a [Highly Available][ha-config] configuration, and the clients natively understand the clustering and how to resume a session transparently when one of the cluster nodes goes away. [watches]: http://zookeeper.apache.org/doc/current/zookeeperProgrammers.html#ch_zkWatches [locking]: http://zookeeper.apache.org/doc/current/recipes.html#sc_recipes_Locks @@ -64,7 +64,7 @@ In addition to all of that, I would like to think that the public API the ZK::Cl [EventMachine]: https://github.com/eventmachine/eventmachine [zk-eventmachine]: https://github.com/zk-ruby/zk-eventmachine -## Release info / Changelog +## Release info / Changelog See the [RELEASES][] page for more info on features and bugfixes in each release. @@ -74,9 +74,9 @@ ZK strives to be a complete, correct, and convenient way of interacting with Zoo * In versions < 0.9 there is only *one* event dispatch thread. It is *very important* that you don't block the event delivery thread. In 1.0, there is one delivery thread by default, but you can adjust the level of concurrency, allowing more control and convenience for building your event-driven app. -* ZK uses threads. You will have to use synchronization primitives if you want to avoid getting hurt. There are use cases that do not require you to think about this, but as soon as you want to register for events, you're using multiple threads. +* ZK uses threads. You will have to use synchronization primitives if you want to avoid getting hurt. There are use cases that do not require you to think about this, but as soon as you want to register for events, you're using multiple threads. -* If you're not familiar with developing solutions with zookeeper, you should read about [sessions][] and [watches][] in the Programmer's Guide. Even if you *are* familiar, you should probably go read it again. +* If you're not familiar with developing solutions with zookeeper, you should read about [sessions][] and [watches][] in the Programmer's Guide. Even if you *are* familiar, you should probably go read it again. * It is very important that you not ignore connection state events if you're using watches. @@ -88,7 +88,7 @@ ZK strives to be a complete, correct, and convenient way of interacting with Zoo [async-branch]: https://github.com/zk-ruby/zk/tree/dev%2Fasync-conveniences [chroot]: http://zookeeper.apache.org/doc/current/zookeeperProgrammers.html#ch_zkSessions [YARD]: http://yardoc.org/ -[sessions]: http://zookeeper.apache.org/doc/current/zookeeperProgrammers.html#ch_zkSessions +[sessions]: http://zookeeper.apache.org/doc/current/zookeeperProgrammers.html#ch_zkSessions [watches]: http://zookeeper.apache.org/doc/r3.3.5/zookeeperProgrammers.html#ch_zkWatches ## Users diff --git a/spec/zk/client_spec.rb b/spec/zk/client_spec.rb index 40cb5e8..9c61716 100644 --- a/spec/zk/client_spec.rb +++ b/spec/zk/client_spec.rb @@ -41,7 +41,7 @@ end end - describe :reopen do + describe :reopen, :jruby => :broken do include_context 'connection opts' before do