Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
57 changes: 35 additions & 22 deletions .github/workflows/ruby.yml
Original file line number Diff line number Diff line change
@@ -1,34 +1,47 @@
# 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 CI

on:
push:
branches: [ main ]
branches: [main]
pull_request:
branches: [ main ]
branches: [main]

permissions:
contents: read

jobs:
test:

name: Test (Ruby ${{ matrix.ruby-version }})
runs-on: ubuntu-latest
timeout-minutes: 10
strategy:
fail-fast: false
matrix:
ruby-version: ['2.6', '2.7', '3.0']

ruby-version: ['3.3', '4.0']
steps:
- uses: actions/checkout@v4
- uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby-version }}
bundler: '4.0.20'
bundler-cache: true
- run: bundle exec rake test
- run: bundle exec rake build
- name: Check standalone gem installation
run: |
sdk_version=$(ruby -r ./lib/version -e 'print PodcastApi::VERSION')
gem install "pkg/podcast_api-$sdk_version.gem" --no-document
cd /tmp
ruby -r podcast_api -e 'abort unless PodcastApi::VERSION == ARGV.fetch(0) && PodcastApi::Client.new.respond_to?(:add_playlist_item)' "$sdk_version"
integration:
name: Integration (public mock API)
runs-on: ubuntu-latest
timeout-minutes: 5
steps:
- uses: actions/checkout@v4
- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby-version }}
bundler-cache: true # runs 'bundle install' and caches installed gems automatically
- name: Setup bundler
run: gem install bundler:1.17.2
- name: Run tests
run: bundle exec rake
- uses: actions/checkout@v4
- uses: ruby/setup-ruby@v1
with:
ruby-version: '4.0'
bundler: '4.0.20'
bundler-cache: true
- run: bundle exec rake integration
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
/tmp/

# Used by dotenv library to load environment variables.
# .env
.env

# Ignore Byebug command history file.
.byebug_history
Expand Down
14 changes: 0 additions & 14 deletions .travis.yml

This file was deleted.

14 changes: 6 additions & 8 deletions Gemfile
Original file line number Diff line number Diff line change
@@ -1,12 +1,10 @@
# frozen_string_literal: true

source "https://rubygems.org"

source 'https://rubygems.org'
gemspec

group :development do
gem "mocha"
gem "rake"
gem "test-unit"
gem "bundler"
end
# Pin direct dependencies for reproducible development and CI.
gem 'httparty', '= 0.24.1'
gem 'rake', '= 13.4.1'
gem 'test-unit', '= 3.7.7'
gem 'webmock', '= 3.26.3'
51 changes: 34 additions & 17 deletions Gemfile.lock
Original file line number Diff line number Diff line change
@@ -1,34 +1,51 @@
PATH
remote: .
specs:
podcast_api (1.1.6)
httparty (~> 0.20.0)
podcast_api (3.0.0)
httparty (>= 0.24.1, < 0.25)

GEM
remote: https://rubygems.org/
specs:
httparty (0.20.0)
mime-types (~> 3.0)
addressable (2.9.0)
public_suffix (>= 2.0.2, < 8.0)
bigdecimal (4.1.3)
crack (1.0.1)
bigdecimal
rexml
csv (3.3.6)
hashdiff (1.2.1)
httparty (0.24.1)
csv
mini_mime (>= 1.0.0)
multi_xml (>= 0.5.2)
mime-types (3.5.1)
mime-types-data (~> 3.2015)
mime-types-data (3.2023.0808)
mocha (1.12.0)
multi_xml (0.6.0)
power_assert (2.0.0)
rake (13.0.3)
test-unit (3.4.1)
mini_mime (1.1.5)
multi_xml (0.9.1)
bigdecimal (>= 3.1, < 5)
power_assert (3.1.0)
public_suffix (7.0.5)
rake (13.4.1)
rexml (3.4.4)
test-unit (3.7.7)
power_assert
webmock (3.26.3)
addressable (>= 2.8.0)
crack (>= 0.3.2)
hashdiff (>= 0.4.0, < 2.0.0)

PLATFORMS
aarch64-linux
arm64-darwin
ruby
x86_64-darwin
x86_64-linux

DEPENDENCIES
bundler
mocha
httparty (= 0.24.1)
podcast_api!
rake
test-unit
rake (= 13.4.1)
test-unit (= 3.7.7)
webmock (= 3.26.3)

BUNDLED WITH
1.17.2
4.0.20
Loading
Loading