(maint) Acceptance fixup: append don't replace hosts file #657
Workflow file for this run
This file contains 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: Rspec tests | |
on: | |
pull_request: | |
branches: | |
- main | |
jobs: | |
rspec_tests: | |
name: ${{ matrix.cfg.os }}(ruby ${{ matrix.cfg.ruby }}) | |
strategy: | |
matrix: | |
cfg: | |
- {os: ubuntu-latest, ruby: 2.4} | |
- {os: ubuntu-latest, ruby: 2.5} | |
- {os: ubuntu-latest, ruby: 2.6} | |
- {os: ubuntu-latest, ruby: 2.7} | |
- {os: ubuntu-latest, ruby: 3.2} | |
- {os: ubuntu-latest, ruby: jruby-9.2.10.0} | |
- {os: windows-2019, ruby: 2.5} | |
- {os: windows-2019, ruby: 2.6} | |
- {os: windows-2019, ruby: 2.7} | |
runs-on: ${{ matrix.cfg.os }} | |
steps: | |
- name: Checkout current PR | |
uses: actions/checkout@v3 | |
- name: Install ruby version ${{ matrix.cfg.ruby }} | |
uses: ruby/setup-ruby@v1 | |
with: | |
ruby-version: ${{ matrix.cfg.ruby }} | |
- name: Install bundler and gems | |
run: | | |
# Pin bundler to maintain support for Ruby 2.4 and 2.5 | |
gem install bundler -v 2.3.26 | |
bundle config set without packaging documentation | |
bundle install --jobs 4 --retry 3 | |
- name: Run tests on Windows | |
if: runner.os == 'Windows' | |
run: | | |
# https://github.com/ruby/ruby/pull/2791/files#diff-ff5ff976e81bebd977f0834e60416abbR97-R100 | |
# Actions uses UTF8, causes test failures, similar to normal OS setup | |
$PSDefaultParameterValues['*:Encoding'] = 'utf8' | |
[Console]::OutputEncoding = [System.Text.Encoding]::GetEncoding("IBM437") | |
[Console]::InputEncoding = [System.Text.Encoding]::GetEncoding("IBM437") | |
$Env:LOG_SPEC_ORDER = 'true' | |
# debug information | |
chcp | |
Get-WinSystemLocale | |
Get-ChildItem Env: | % { Write-Output "$($_.Key): $($_.Value)" } | |
# list current OpenSSL install | |
gem list openssl | |
ruby -ropenssl -e 'puts \"OpenSSL Version - #{OpenSSL::OPENSSL_VERSION}\"; puts \"OpenSSL Library Version - #{OpenSSL::OPENSSL_LIBRARY_VERSION}\"' | |
Get-Content Gemfile.lock | |
ruby -v | |
gem --version | |
bundle --version | |
# Run tests | |
bundle exec rspec --color --format documentation spec | |
- name: Run tests on Linux | |
if: runner.os == 'Linux' | |
run: | | |
# debug information | |
cat Gemfile.lock | |
ruby -v | |
gem --version | |
bundle --version | |
if [[ ${{ matrix.cfg.ruby }} =~ "jruby" ]]; then | |
export _JAVA_OPTIONS='-Xmx1024m -Xms512m' | |
# workaround for PUP-10683 | |
sudo apt remove rpm | |
fi | |
# Run tests | |
bundle exec rspec --color --format documentation spec |