2019-08-28 22:42:11 -04:00
|
|
|
name: Ruby
|
|
|
|
|
|
|
|
on: [push]
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
lint:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v1
|
2020-10-03 12:55:24 -04:00
|
|
|
- name: Set up Ruby 2.7
|
2021-10-05 21:34:40 -04:00
|
|
|
uses: ruby/setup-ruby@v1
|
2019-08-28 22:42:11 -04:00
|
|
|
with:
|
2021-10-05 21:34:40 -04:00
|
|
|
ruby-version: 2.7
|
2019-08-28 22:42:11 -04:00
|
|
|
- name: Build and test with Rake
|
|
|
|
run: |
|
2020-02-06 23:18:28 -05:00
|
|
|
gem install bundler
|
2019-08-28 22:42:11 -04:00
|
|
|
bundle install --jobs 4 --retry 3
|
2020-02-19 07:52:46 -05:00
|
|
|
bundle exec standardrb
|
2019-08-28 22:42:11 -04:00
|
|
|
|
|
|
|
test:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
strategy:
|
|
|
|
matrix:
|
2022-10-04 21:47:43 -04:00
|
|
|
ruby_version: [2.4, 2.5, 2.6, 2.7, 3.0, 3.1]
|
2019-08-28 22:42:11 -04:00
|
|
|
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v1
|
|
|
|
- name: Set up Ruby ${{ matrix.ruby_version }}
|
2021-10-05 21:34:40 -04:00
|
|
|
uses: ruby/setup-ruby@v1
|
2019-08-28 22:42:11 -04:00
|
|
|
with:
|
|
|
|
ruby-version: ${{ matrix.ruby_version }}
|
|
|
|
- name: Build and test with Rake
|
|
|
|
run: |
|
2020-02-06 23:18:28 -05:00
|
|
|
gem install bundler
|
2019-08-28 22:42:11 -04:00
|
|
|
bundle install --jobs 4 --retry 3
|
|
|
|
bundle exec rspec
|
2019-10-09 22:25:20 -04:00
|
|
|
|
|
|
|
rails:
|
|
|
|
runs-on: ubuntu-latest
|
2021-10-05 21:34:40 -04:00
|
|
|
strategy:
|
|
|
|
matrix:
|
2022-10-04 21:47:43 -04:00
|
|
|
ruby_version: [2.7, 3.0, 3.1]
|
2019-10-09 22:25:20 -04:00
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v1
|
2021-10-05 21:34:40 -04:00
|
|
|
- name: Set up Ruby ${{ matrix.ruby_version }}
|
|
|
|
uses: ruby/setup-ruby@v1
|
2019-10-09 22:25:20 -04:00
|
|
|
with:
|
2021-10-05 21:34:40 -04:00
|
|
|
ruby-version: ${{ matrix.ruby_version }}
|
2019-10-09 22:25:20 -04:00
|
|
|
- name: Test gem in Rails application
|
|
|
|
run: |
|
|
|
|
cd spec/rails
|
|
|
|
gem install bundler
|
|
|
|
bundle install --jobs 4 --retry 3
|
|
|
|
bundle exec rails test
|
|
|
|
env:
|
|
|
|
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
|
|
|
|
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
|
|
|
|
AWS_DEFAULT_REGION: us-east-2
|
|
|
|
PARAMETER_STORE_PATH: /psenv/test/
|