Skip to content

Suppress warning at literal string #1589

Suppress warning at literal string

Suppress warning at literal string #1589

Workflow file for this run

name: CI
on: [push, pull_request]
permissions:
contents: read
jobs:
specs:
strategy:
fail-fast: false
matrix:
os: [ ubuntu, macos, windows ]
ruby: [ 3.0.6, 3.1.4, 3.2.2, 3.3.0 ]
rubyopt: [""]
include:
- os: ubuntu
ruby: 3.3.0
rubyopt: "--enable-frozen-string-literal"
runs-on: ${{ matrix.os }}-latest
steps:
- name: git config autocrlf
run: git config --global core.autocrlf false
if: matrix.os == 'windows'
- uses: actions/checkout@v4
- 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
- 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
- name: Run specs (Windows)
if: matrix.os == 'windows'
env:
CHECK_LEAKS: true
run: |
# Actions uses UTF8, causes test failures, similar to normal OS setup
[Console]::OutputEncoding = [System.Text.Encoding]::GetEncoding("IBM437")
[Console]::InputEncoding = [System.Text.Encoding]::GetEncoding("IBM437")
../mspec/bin/mspec -j
- name: Run C-API specs as C++
if: matrix.os != 'windows'
env:
SPEC_CAPI_CXX: true
run: ../mspec/bin/mspec :capi
- 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@v4
- uses: ruby/setup-ruby@v1
with:
ruby-version: '3.0'
- run: gem install rubocop:1.28.2
- run: rubocop --parallel