From 83b675726d783101152f028b90d2dffd1aea21f9 Mon Sep 17 00:00:00 2001 From: Kanwei Li Date: Tue, 15 Apr 2025 11:09:24 -0400 Subject: [PATCH 1/3] Try github actions --- .github/workflows/ci.yml | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 .github/workflows/ci.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 00000000..ddeb756d --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,32 @@ +# .github/workflows/ci.yml + +name: Ruby CI + +on: + push: + branches: [master] + pull_request: + branches: [master] + +jobs: + test: + runs-on: ubuntu-latest + strategy: + fail-fast: false # Don't cancel other matrix jobs if one fails + matrix: + ruby-version: ['2.3', '2.4', '2.5', '2.6', '2.7', '3.0', '3.1', '3.2', '3.3'] + + steps: + - name: Checkout code + uses: actions/checkout@v4 + + - name: Set up Ruby ${{ matrix.ruby-version }} + uses: ruby/setup-ruby@v1 + with: + ruby-version: ${{ matrix.ruby-version }} + # This automatically runs 'bundle install' and caches gems + # It uses the Gemfile.lock for efficient caching + bundler-cache: true + + - name: Run RSpec tests + run: bundle exec rspec \ No newline at end of file From 7106899e49709a52a725ee01f2d955b623ad6c38 Mon Sep 17 00:00:00 2001 From: Kanwei Li Date: Tue, 15 Apr 2025 11:43:25 -0400 Subject: [PATCH 2/3] Use bundler: latest --- .github/workflows/ci.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index ddeb756d..02350e84 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -24,6 +24,7 @@ jobs: uses: ruby/setup-ruby@v1 with: ruby-version: ${{ matrix.ruby-version }} + bundler: latest # This automatically runs 'bundle install' and caches gems # It uses the Gemfile.lock for efficient caching bundler-cache: true From b18a3bbf962d59be05ec114cf5695f90d16aa4e2 Mon Sep 17 00:00:00 2001 From: Kanwei Li Date: Tue, 15 Apr 2025 11:49:04 -0400 Subject: [PATCH 3/3] README badge --- .travis.yml | 12 ------------ README.markdown | 2 +- 2 files changed, 1 insertion(+), 13 deletions(-) delete mode 100644 .travis.yml diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 6f5160e7..00000000 --- a/.travis.yml +++ /dev/null @@ -1,12 +0,0 @@ -language: ruby -rvm: - - 3.0 - - 2.7 - - 2.6 - - 2.5 - - 2.4 - - 2.3 - -before_install: - - gem update --system - - gem update bundler diff --git a/README.markdown b/README.markdown index cc8e71db..8c1e70a1 100644 --- a/README.markdown +++ b/README.markdown @@ -1,4 +1,4 @@ -# algorithms [![Build Status](https://travis-ci.org/kanwei/algorithms.svg?branch=master)](https://travis-ci.org/github/kanwei/algorithms) +# algorithms [![Ruby CI](https://github.com/kanwei/algorithms/actions/workflows/ci.yml/badge.svg?branch=master)](https://github.com/kanwei/algorithms/actions/workflows/ci.yml) [API Documentation](http://kanwei.github.io/algorithms/)