Ignore workspace dependencies in cache processes (#1174) #1239
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
| # This workflow uses actions that are not certified by GitHub. | |
| # They are provided by a third-party and are governed by | |
| # separate terms of service, privacy policy, and support | |
| # documentation. | |
| # This workflow will download a prebuilt Ruby version, install dependencies and run tests with rspec. | |
| # For more information see: https://github.com/marketplace/actions/setup-ruby-jruby-and-truffleruby | |
| name: RSpec | |
| on: | |
| push: | |
| branches: [ master ] | |
| pull_request: | |
| branches: [ master ] | |
| permissions: | |
| contents: read | |
| jobs: | |
| rspec: | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: | |
| ruby-version: ['3.0', '3.1', '3.2', '3.3', '3.4', '4.0'] | |
| rbs-version: ['3.6.1', '3.9.5', '4.0.0.dev.4'] | |
| # Ruby 3.0 doesn't work with RBS 3.9.4 or 4.0.0.dev.4 | |
| exclude: | |
| - ruby-version: '3.0' | |
| rbs-version: '3.9.5' | |
| - ruby-version: '3.0' | |
| rbs-version: '4.0.0.dev.4' | |
| # Missing require in 'rbs collection update' - hopefully | |
| # fixed in next RBS release | |
| - ruby-version: '4.0' | |
| rbs-version: '3.6.1' | |
| - ruby-version: '4.0' | |
| rbs-version: '4.0.0.dev.4' | |
| steps: | |
| - uses: actions/checkout@v3 | |
| - name: Set up Ruby | |
| uses: ruby/setup-ruby@v1 | |
| with: | |
| ruby-version: ${{ matrix.ruby-version }} | |
| # see https://github.com/castwide/solargraph/actions/runs/19391419903/job/55485410493?pr=1119 | |
| # | |
| # match version in Gemfile.lock and use same version below | |
| bundler: 2.5.23 | |
| bundler-cache: false | |
| - name: Set rbs version | |
| run: echo "gem 'rbs', '${{ matrix.rbs-version }}'" >> .Gemfile | |
| # /home/runner/.rubies/ruby-head/lib/ruby/gems/3.5.0+2/gems/rbs-3.9.4/lib/rbs.rb:11: | |
| # warning: tsort was loaded from the standard library, | |
| # but will no longer be part of the default gems | |
| # starting from Ruby 3.6.0 | |
| - name: Work around legacy rbs deprecation on ruby > 3.4 | |
| run: echo "gem 'tsort'" >> .Gemfile | |
| - name: Install gems | |
| run: | | |
| bundle _2.5.23_ install | |
| bundle update rbs # use latest available for this Ruby version | |
| bundle list | |
| bundle exec solargraph pin 'Bundler::Dsl#source' | |
| - name: Update types | |
| run: | | |
| bundle exec rbs collection update | |
| - name: Run tests | |
| run: bundle exec rake spec | |
| undercover: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v3 | |
| with: | |
| # fetch all history for all branches and tags so we can | |
| # compare against origin/master | |
| fetch-depth: 0 | |
| - name: Set up Ruby | |
| uses: ruby/setup-ruby@v1 | |
| with: | |
| ruby-version: '3.4' | |
| bundler-cache: false | |
| - name: Install gems | |
| run: bundle install | |
| - name: Run tests | |
| run: bundle exec rake spec | |
| - name: Check PR coverage | |
| run: bundle exec rake undercover | |
| continue-on-error: true |