Clarify comment #2252
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: CI | |
| on: | |
| push: | |
| branches: [master] | |
| pull_request: | |
| permissions: | |
| contents: read | |
| jobs: | |
| specs: | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| os: [ ubuntu, macos, windows ] | |
| ruby: [ 3.2.9, 3.3.10, 3.4.8, 4.0.0 ] | |
| mspecopt: [""] | |
| rubyopt: [""] | |
| exclude: | |
| - { os: windows, ruby: 3.2.9 } # 3.2.9 has some issue with file time microseconds | |
| include: | |
| - { os: windows, ruby: 3.2.8 } # 3.2.9 has some issue with file time microseconds | |
| - { os: ubuntu, ruby: 4.0.0, mspecopt: "--repeat 2" } | |
| - { os: ubuntu, ruby: 4.0.0, rubyopt: "--enable-frozen-string-literal" } | |
| - { os: ubuntu, ruby: 4.0.0, rubyopt: "--parser=parse.y" } | |
| runs-on: ${{ matrix.os }}-latest | |
| steps: | |
| - name: git config autocrlf | |
| run: git config --global core.autocrlf false | |
| if: matrix.os == 'windows' | |
| - uses: actions/checkout@v6 | |
| - uses: ruby/setup-ruby@v1 | |
| with: | |
| ruby-version: ${{ matrix.ruby }} | |
| bundler: none | |
| - name: Clone MSpec | |
| run: git clone https://github.com/ruby/mspec.git ../mspec | |
| - name: Run specs (Linux) | |
| if: matrix.os == 'ubuntu' | |
| env: | |
| CHECK_LEAKS: true | |
| RUBYOPT: "${{ matrix.rubyopt }}" | |
| run: ../mspec/bin/mspec -j --timeout 30 ${{ matrix.mspecopt }} | |
| - name: Run specs (macOS) | |
| if: matrix.os == 'macos' | |
| env: | |
| CHECK_LEAKS: true | |
| # Use a larger timeout on macOS since it seems to have less reliable performance | |
| run: ../mspec/bin/mspec -j --timeout 90 ${{ matrix.mspecopt }} | |
| - name: Run specs (Windows) | |
| if: matrix.os == 'windows' | |
| env: | |
| CHECK_LEAKS: true | |
| run: | | |
| # Actions uses UTF8 but most Windows systems don't. | |
| # Use non-UTF8 to make sure specs pass with non-UTF8 too. | |
| [Console]::OutputEncoding = [System.Text.Encoding]::GetEncoding("IBM437") | |
| [Console]::InputEncoding = [System.Text.Encoding]::GetEncoding("IBM437") | |
| ../mspec/bin/mspec -j ${{ matrix.mspecopt }} | |
| - name: Run C-API specs as C++ | |
| if: matrix.os != 'windows' | |
| env: | |
| SPEC_CAPI_CXX: true | |
| run: ../mspec/bin/mspec :capi ${{ matrix.mspecopt }} | |
| - name: Run require_relative checker | |
| if: matrix.os == 'ubuntu' | |
| run: ../mspec/tool/check_require_spec_helper.rb | |
| rubocop: | |
| name: RuboCop | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - uses: ruby/setup-ruby@v1 | |
| with: | |
| ruby-version: '4.0' | |
| - run: bin/rubocop |