Implement config constraints #982
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: Smithy Ruby 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: Build test SDK | |
working-directory: codegen | |
run: | |
./gradlew :smithy-ruby-codegen-test:build | |
- name: Upload generated test SDK | |
uses: actions/upload-artifact@v2 | |
with: | |
name: white_label | |
path: codegen/smithy-ruby-codegen-test/build/smithyprojections/smithy-ruby-codegen-test/white-label/ruby-codegen/white_label | |
ruby-rbs-type-check: | |
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: white_label | |
path: white_label | |
- name: Copy Gemfile | |
run: cp hearth/Gemfile white_label/ | |
- name: Install gems | |
run: bundle install | |
working-directory: ./white_label | |
- name: Type checks | |
run: steep check | |
working-directory: ./white_label | |
ruby-integration-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: white_label | |
path: white_label | |
- name: Copy Gemfile | |
run: cp hearth/Gemfile white_label/ | |
- name: Install gems | |
run: bundle install | |
working-directory: ./white_label | |
- name: Integration specs | |
run: rspec | |
working-directory: ./white_label | |
codegen-rubocop: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Setup Ruby 3.2 | |
uses: ruby/setup-ruby@v1 | |
with: | |
ruby-version: 3.2 | |
- uses: actions/checkout@v2 | |
- name: Copy Gemfile and its dependencies | |
run: cp hearth/Gemfile hearth/hearth.gemspec hearth/VERSION codegen/ | |
- name: Install gems | |
run: bundle install | |
working-directory: ./codegen | |
- name: Run rubocop | |
run: bundle exec rubocop -E -S | |
working-directory: ./codegen |