rubocop-ast: format and fix type signatures to pass rbs/test @kozy4324 #2083
Workflow file for this run
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: Test | |
| on: | |
| push: | |
| branches: | |
| - main | |
| pull_request: {} | |
| permissions: | |
| contents: read | |
| jobs: | |
| syntax_check: | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 30 | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - uses: ruby/setup-ruby@v1 | |
| with: | |
| ruby-version: ruby | |
| bundler-cache: true | |
| - name: 'Install dependencies' | |
| run: 'gem install rbs' | |
| - name: 'Test syntax check' | |
| run: 'rbs parse gems/**/*.rbs' | |
| test_on_changed_gems: | |
| if: github.event_name == 'pull_request' | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 30 | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - uses: ruby/setup-ruby@v1 | |
| with: | |
| ruby-version: ruby | |
| bundler-cache: true | |
| - name: Run bin/setup | |
| run: bin/setup | |
| - name: Get changed gems | |
| id: changes | |
| run: | | |
| END_MARKER="$(uuidgen)" | |
| echo "gems<<${END_MARKER}" >> "$GITHUB_OUTPUT" | |
| gh pr diff '${{ github.event.number }}' --name-only | \ | |
| grep '^gems/' | \ | |
| awk -F / '{printf "%s/%s/%s\n", $1, $2, $3}' | \ | |
| sort -u | \ | |
| tee -a "$GITHUB_OUTPUT" | |
| echo "${END_MARKER}" >> "$GITHUB_OUTPUT" | |
| env: | |
| GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Run test on changed gems | |
| if: steps.changes.outputs.gems | |
| run: | | |
| cat <<EOD | xargs bin/test --verbose | |
| ${{ steps.changes.outputs.gems }} | |
| EOD | |
| test_all_gems: | |
| if: github.event_name != 'pull_request' | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 60 | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - uses: ruby/setup-ruby@v1 | |
| with: | |
| ruby-version: ruby | |
| bundler-cache: true | |
| - name: Run bin/setup | |
| run: bin/setup | |
| - name: Run test on all gems | |
| run: bin/test --all --verbose | |
| test_rubocop_yml: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - uses: ruby/setup-ruby@v1 | |
| with: | |
| ruby-version: ruby | |
| bundler-cache: true | |
| - name: Check .rubocop.yml | |
| run: ruby .github/workflows/pr_bot/strict_rubocop_config.rb |