Identity and Auth #777
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Rails Codegen CI | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
branches: | |
- main | |
env: | |
java_version: 17 | |
jobs: | |
generate-test-sdk: | |
name: Generate the test sdk | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: actions/cache@v2 | |
with: | |
path: | | |
~/.gradle/caches | |
~/.gradle/wrapper | |
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*') }} | |
restore-keys: | | |
${{ runner.os }}-gradle- | |
- name: Set up JDK | |
uses: actions/setup-java@v1 | |
with: | |
java-version: ${{ env.java_version }} | |
- name: test | |
working-directory: codegen | |
run: | |
./gradlew :smithy-ruby-rails-codegen-test:build | |
- name: Upload Generated Protocol Test SDK | |
uses: actions/upload-artifact@v2 | |
with: | |
name: rails_json | |
path: codegen/smithy-ruby-rails-codegen-test/build/smithyprojections/smithy-ruby-rails-codegen-test/railsjson/ruby-codegen/rails_json | |
rails-json-protocol-specs: | |
needs: [generate-test-sdk] | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: false | |
matrix: | |
ruby: ['3.0', 3.1, 3.2] | |
steps: | |
- name: Setup Ruby | |
uses: ruby/setup-ruby@v1 | |
with: | |
ruby-version: ${{ matrix.ruby }} | |
- uses: actions/checkout@v2 | |
- name: Build and install Hearth | |
run: | | |
gem build hearth.gemspec | |
gem install hearth-$(<VERSION).gem | |
working-directory: ./hearth | |
- name: Download generated test sdk | |
uses: actions/download-artifact@v2 | |
with: | |
name: rails_json | |
path: rails_json | |
- name: Copy Gemfile | |
run: | | |
cp hearth/Gemfile rails_json/ | |
- name: Install gems | |
run: | | |
bundle install | |
working-directory: ./rails_json | |
- name: Tests | |
run: bundle exec rspec -I ../hearth/lib | |
working-directory: ./rails_json |