Allow rack 3 #16
This file contains hidden or 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: "linting & testing" | |
| on: | |
| push: | |
| branches: | |
| - main | |
| paths: | |
| - "gemfiles/**" | |
| - "lib/**" | |
| - "spec/**" | |
| - ".github/workflows/main.yml" | |
| pull_request: | |
| jobs: | |
| lint: | |
| runs-on: ubuntu-latest | |
| env: | |
| APPRAISAL_NAME: rack_3 | |
| BUNDLE_GEMFILE: ./gemfiles/rack_3.gemfile | |
| steps: | |
| - uses: actions/checkout@v2 | |
| - uses: ruby/setup-ruby@v1 | |
| with: | |
| ruby-version: 3.0 | |
| - uses: actions/cache@v4 | |
| with: | |
| path: vendor/bundle | |
| key: bundle-use-ruby-ubuntu-latest-3.0-rack_3-${{ hashFiles(format('{0}.lock', env.BUNDLE_GEMFILE)) }} | |
| restore-keys: | | |
| bundle-use-ruby-ubuntu-latest-3.0-rack_3 | |
| - name: bundle install | |
| run: | | |
| bundle config deployment true | |
| bundle config path vendor/bundle | |
| bundle install --jobs 4 | |
| - name: "Run rubocop" | |
| run: | | |
| bin/rubocop | |
| rspec: | |
| runs-on: ubuntu-latest | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| appraisal_name: [rack_2, rack_3, rails_6_0, rails_6_1] | |
| ruby: [3.0] | |
| env: | |
| APPRAISAL_NAME: ${{ matrix.appraisal_name }} | |
| BUNDLE_GEMFILE: ${{ format('./gemfiles/{0}.gemfile', matrix.appraisal_name) }} | |
| steps: | |
| - uses: actions/checkout@v2 | |
| - uses: ruby/setup-ruby@v1 | |
| with: | |
| ruby-version: ${{ matrix.ruby }} | |
| - uses: actions/cache@v4 | |
| with: | |
| path: vendor/bundle | |
| key: bundle-use-ruby-ubuntu-latest-${{ matrix.ruby }}-${{ env.APPRAISAL_NAME }}-${{ hashFiles(format('{0}.lock', env.BUNDLE_GEMFILE)) }} | |
| restore-keys: | | |
| bundle-use-ruby-ubuntu-latest-${{ matrix.ruby }}-${{ env.APPRAISAL_NAME }} | |
| - name: bundle install | |
| run: | | |
| bundle config deployment true | |
| bundle config path vendor/bundle | |
| bundle install --jobs 4 | |
| - name: "Run RSpec" | |
| run: | | |
| bin/rspec |