From e27b737a97e74f79d867dbc5c6dbbfa8c65c6fc4 Mon Sep 17 00:00:00 2001 From: Fumiaki MATSUSHIMA Date: Wed, 22 May 2024 21:13:57 +0900 Subject: [PATCH 1/2] Update gem to fix CI error for Ruby 2.6 https://github.com/mtsmfm/language_server-protocol-ruby/actions/runs/9179048644/job/25275521882?pr=104 ``` Your RubyGems version (3.0.3.1) has a bug that prevents `required_ruby_version` from working for Bundler. Any scripts that use `gem install bundler` will break as soon as Bundler drops support for your Ruby version. Please upgrade RubyGems to avoid future breakage and silence this warning by running `gem update --system 3.2.3` /home/runner/work/language_server-protocol-ruby/language_server-protocol-ruby/vendor/bundle/ruby/2.6.0/gems/steep-1.3.0/lib/steep.rb:19:in `require': cannot load such file -- parallel/processor_count (LoadError) ``` --- .github/workflows/ubuntu-test.yml | 2 ++ .github/workflows/windows-test.yml | 2 ++ 2 files changed, 4 insertions(+) diff --git a/.github/workflows/ubuntu-test.yml b/.github/workflows/ubuntu-test.yml index 3e76dd5..0bea06d 100644 --- a/.github/workflows/ubuntu-test.yml +++ b/.github/workflows/ubuntu-test.yml @@ -24,6 +24,8 @@ jobs: bundler-cache: true - run: gem update --system if: matrix.ruby != '2.5' && matrix.ruby != '2.6' && matrix.ruby != '2.7' + - run: gem update --system 3.2.3 + if: matrix.ruby == '2.6' - run: bundle exec rake - run: bundle exec rake env: diff --git a/.github/workflows/windows-test.yml b/.github/workflows/windows-test.yml index 06cf824..a3cc324 100644 --- a/.github/workflows/windows-test.yml +++ b/.github/workflows/windows-test.yml @@ -24,6 +24,8 @@ jobs: bundler-cache: true - run: gem update --system if: matrix.ruby != '2.5' && matrix.ruby != '2.6' && matrix.ruby != '2.7' + - run: gem update --system 3.2.3 + if: matrix.ruby == '2.6' - run: bundle exec rake - run: bundle exec rake env: From b06028422ed51b87e636336c384177807bc5a69a Mon Sep 17 00:00:00 2001 From: Fumiaki MATSUSHIMA Date: Wed, 22 May 2024 21:16:18 +0900 Subject: [PATCH 2/2] Consider forked repo https://github.com/mtsmfm/language_server-protocol-ruby/actions/runs/9179048640/job/25275521359 --- .github/workflows/generator.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/generator.yml b/.github/workflows/generator.yml index 0960829..074f7d9 100644 --- a/.github/workflows/generator.yml +++ b/.github/workflows/generator.yml @@ -14,6 +14,7 @@ jobs: - uses: actions/checkout@v4 with: ref: ${{ github.head_ref }} + repository: ${{ github.event.pull_request.head.repo.full_name }} - id: commit_author run: echo "name=author::$(git show -s --format=%an)" >> $GITHUB_OUTPUT @@ -26,6 +27,7 @@ jobs: with: submodules: true ref: ${{ github.head_ref }} + repository: ${{ github.event.pull_request.head.repo.full_name }} token: ${{ secrets.PAT }} - uses: ruby/setup-ruby@v1 with: @@ -36,7 +38,7 @@ jobs: node-version: 18 - run: bin/generate_files - run: git diff --exit-code - - if: failure() + - if: failure() && github.event.pull_request.head.repo.full_name == 'mtsmfm/language_server-protocol-ruby' run: | git config user.name "github-actions[bot]" git config user.email "41898282+github-actions[bot]@users.noreply.github.com"