forked from ListenNotes/podcast-api-ruby
-
Notifications
You must be signed in to change notification settings - Fork 0
47 lines (44 loc) · 1.28 KB
/
Copy pathruby.yml
File metadata and controls
47 lines (44 loc) · 1.28 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
name: Ruby CI
on:
push:
branches: [main]
pull_request:
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: ['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
- uses: ruby/setup-ruby@v1
with:
ruby-version: '4.0'
bundler: '4.0.20'
bundler-cache: true
- run: bundle exec rake integration