New Typedef library #1889
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
| --- | |
| # To debug locally: | |
| # npm install -g act | |
| # act pull_release -j overcommit | |
| name: Linting | |
| on: | |
| workflow_dispatch: {} | |
| pull_request: | |
| branches: ['*'] | |
| push: | |
| branches: | |
| - 'master' | |
| tags: | |
| - 'v*' | |
| permissions: | |
| pull-requests: write | |
| contents: read | |
| jobs: | |
| overcommit: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v2 | |
| # Number of commits to fetch. 0 indicates all history for all branches and tags. | |
| with: | |
| fetch-depth: 0 | |
| - uses: ruby/setup-ruby@v1 | |
| with: | |
| ruby-version: 3.4 | |
| bundler-cache: true | |
| cache-version: 2026-01-11 | |
| - name: Update to best available RBS | |
| run: | | |
| # Add optional gem to be able to typecheck related code | |
| echo "gem 'vernier', '>1.0', '<2'" >> .Gemfile | |
| bundle install | |
| - name: Restore cache of gem annotations | |
| id: dot-cache-restore | |
| uses: actions/cache/restore@v4 | |
| with: | |
| key: | | |
| 2025-06-26-09-${{ runner.os }}-dot-cache-${{ hashFiles('Gemfile.lock') }} | |
| restore-keys: | | |
| 2025-06-26-09-${{ runner.os }}-dot-cache | |
| 2025-06-26-09-${{ runner.os }}-dot-cache- | |
| path: | | |
| /home/runner/.cache/solargraph | |
| - name: Install gem types | |
| run: bundle exec rbs collection install | |
| - name: Overcommit | |
| run: | | |
| bundle exec overcommit --sign | |
| SOLARGRAPH_ASSERTS=on bundle exec overcommit --run --diff origin/master | |
| # @todo Temporary, expect to revert in 0.60 | |
| continue-on-error: true | |
| rubocop: | |
| name: rubocop | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 | |
| - uses: ruby/setup-ruby@1a615958ad9d422dd932dc1d5823942ee002799f # v1.227.0 | |
| with: | |
| ruby-version: '3.3' | |
| bundler-cache: true | |
| - uses: reviewdog/action-rubocop@fcb74ba274da10b18d038d0bcddaae3518739634 # v2.21.2 | |
| with: | |
| reporter: github-pr-check | |
| skip_install: true | |
| use_bundler: true | |
| rubocop_extensions: 'rubocop-rspec:gemfile rubocop-rake:gemfile rubocop-yard:gemfile' | |
| rubocop_flags: '-c .rubocop.yml' | |
| fail_level: info | |
| rubocop_version: Gemfile | |
| level: info | |
| rbs_validate: | |
| name: rbs validate | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v3 | |
| - 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 rbs validate | |
| run: bundle exec rbs validate | |
| # @todo Temporary, expect to revert in 0.60 | |
| continue-on-error: true | |
| rubocop_todo: | |
| name: .rubocop_todo.yml | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v3 | |
| - 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 RuboCop | |
| run: bundle exec rubocop -c .rubocop.yml | |
| # @todo Temporary, expect to revert in 0.60 | |
| continue-on-error: true | |
| - name: Run RuboCop against todo file | |
| continue-on-error: true | |
| run: | | |
| cmd="bundle exec rubocop --auto-gen-config --exclude-limit=5 --no-offense-counts --no-auto-gen-timestamp" | |
| ${cmd:?} | |
| set +e | |
| if [ -n "$(git status --porcelain)" ] | |
| then | |
| git status --porcelain | |
| git diff -u . | |
| >&2 echo "Please address any new issues, then run '${cmd:?}' and push up any improvements" | |
| exit 1 | |
| fi |