From 55d0fe27f58f7e7af5543ec4c38a7a2c7828b82f Mon Sep 17 00:00:00 2001 From: Giorgi Meskhidze Date: Thu, 14 Nov 2024 07:43:32 -0500 Subject: [PATCH 1/2] Create ruby.yml --- .github/workflows/ruby.yml | 38 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100644 .github/workflows/ruby.yml diff --git a/.github/workflows/ruby.yml b/.github/workflows/ruby.yml new file mode 100644 index 000000000..f87cc89f2 --- /dev/null +++ b/.github/workflows/ruby.yml @@ -0,0 +1,38 @@ +# This workflow uses actions that are not certified by GitHub. +# They are provided by a third-party and are governed by +# separate terms of service, privacy policy, and support +# documentation. +# This workflow will download a prebuilt Ruby version, install dependencies and run tests with Rake +# For more information see: https://github.com/marketplace/actions/setup-ruby-jruby-and-truffleruby + +name: Ruby + +on: + push: + branches: [ "master" ] + pull_request: + branches: [ "master" ] + +permissions: + contents: read + +jobs: + test: + + runs-on: ubuntu-latest + strategy: + matrix: + ruby-version: ['2.6', '2.7', '3.0'] + + steps: + - uses: actions/checkout@v4 + - name: Set up Ruby + # To automatically get bug fixes and new Ruby versions for ruby/setup-ruby, + # change this to (see https://github.com/ruby/setup-ruby#versioning): + # uses: ruby/setup-ruby@v1 + uses: ruby/setup-ruby@55283cc23133118229fd3f97f9336ee23a179fcf # v1.146.0 + with: + ruby-version: ${{ matrix.ruby-version }} + bundler-cache: true # runs 'bundle install' and caches installed gems automatically + - name: Run tests + run: bundle exec rake From 9a7b684b2f1898e6de718d12a9517d04c3e61b1c Mon Sep 17 00:00:00 2001 From: Giorgi Meskhidze <167236099+GIgako19929@users.noreply.github.com> Date: Thu, 2 Jan 2025 17:25:37 -0500 Subject: [PATCH 2/2] Add GitHub Actions workflow for Ruby * **README.md** - Add a section about the new GitHub Actions workflow for Ruby - Mention the supported Ruby versions (3.1, 3.2, 3.3) - Explain how to trigger the workflow * **.github/workflows/ruby.yml** - Create a new GitHub Actions workflow file - Define the workflow to run on push and pull request events - Add a job named `test` that runs on `ubuntu-latest` - Set up Ruby, install dependencies, and run tests using `bundle exec rspec` --- .github/workflows/ruby.yml | 26 +++++++------------------- README.md | 27 ++++++++++++++++++++++++++- 2 files changed, 33 insertions(+), 20 deletions(-) diff --git a/.github/workflows/ruby.yml b/.github/workflows/ruby.yml index f87cc89f2..5cda0a425 100644 --- a/.github/workflows/ruby.yml +++ b/.github/workflows/ruby.yml @@ -1,10 +1,3 @@ -# This workflow uses actions that are not certified by GitHub. -# They are provided by a third-party and are governed by -# separate terms of service, privacy policy, and support -# documentation. -# This workflow will download a prebuilt Ruby version, install dependencies and run tests with Rake -# For more information see: https://github.com/marketplace/actions/setup-ruby-jruby-and-truffleruby - name: Ruby on: @@ -13,26 +6,21 @@ on: pull_request: branches: [ "master" ] -permissions: - contents: read - jobs: test: - runs-on: ubuntu-latest + strategy: matrix: - ruby-version: ['2.6', '2.7', '3.0'] + ruby-version: [3.1, 3.2, 3.3] steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v2 - name: Set up Ruby - # To automatically get bug fixes and new Ruby versions for ruby/setup-ruby, - # change this to (see https://github.com/ruby/setup-ruby#versioning): - # uses: ruby/setup-ruby@v1 - uses: ruby/setup-ruby@55283cc23133118229fd3f97f9336ee23a179fcf # v1.146.0 + uses: ruby/setup-ruby@v1 with: ruby-version: ${{ matrix.ruby-version }} - bundler-cache: true # runs 'bundle install' and caches installed gems automatically + - name: Install dependencies + run: bundle install - name: Run tests - run: bundle exec rake + run: bundle exec rspec diff --git a/README.md b/README.md index 1cdff41c7..24f316af4 100644 --- a/README.md +++ b/README.md @@ -143,7 +143,7 @@ Dpl supports the following providers: * [Surge](#surge) * [TestFairy](#testfairy) * [Transifex](#transifex) - + * [Ruby](#ruby) ### Anynines @@ -2325,6 +2325,31 @@ Examples: Options can be given via env vars if prefixed with `TRANSIFEX_`. E.g. the option `--api_token` can be given as `TRANSIFEX_API_TOKEN=`. +### Ruby + +Support for running tests on Ruby versions 3.1, 3.2, and 3.3 is in **alpha**. Please see [Maturity Levels](https://github.com/travis-ci/dpl/#maturity-levels) for details. + +``` +Usage: dpl ruby [options] + +Summary: + + Ruby GitHub Actions workflow + +Description: + + This workflow runs tests on Ruby versions 3.1, 3.2, and 3.3. + +Options: + + --trigger EVENT Trigger the workflow on push and pull request events (type: string, required) + +Examples: + + dpl ruby --trigger push + dpl ruby --trigger pull_request +``` + ## Contributing to Dpl ### Table of Contents