-
Notifications
You must be signed in to change notification settings - Fork 2.2k
85 lines (73 loc) · 2.66 KB
/
rspec_tests.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
---
name: RSpec tests
on:
push:
branches: [7.x]
pull_request:
branches: [7.x]
permissions:
contents: read
jobs:
rspec_tests:
name: ${{ matrix.cfg.os }}(ruby ${{ matrix.cfg.ruby }})
strategy:
matrix:
cfg:
- {os: ubuntu-latest, ruby: '2.5'}
- {os: ubuntu-latest, ruby: '2.6'}
- {os: ubuntu-latest, ruby: '2.7'}
- {os: ubuntu-latest, ruby: '3.0'}
- {os: ubuntu-latest, ruby: 'jruby-9.3.14.0'}
- {os: windows-2019, ruby: '2.5'}
- {os: windows-2019, ruby: '2.6'}
- {os: windows-2019, ruby: '2.7'}
- {os: windows-2019, ruby: '3.0'}
runs-on: ${{ matrix.cfg.os }}
env:
BUNDLE_SET: "without packaging documentation"
steps:
- name: Checkout current PR
uses: actions/checkout@v4
- name: Install ruby version ${{ matrix.cfg.ruby }}
uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.cfg.ruby }}
bundler-cache: true
- 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 rake parallel:spec[2]
- name: Run tests on Linux
if: runner.os == 'Linux'
run: |
# debug information
gem list openssl
ruby -ropenssl -e 'puts "OpenSSL Version - #{OpenSSL::OPENSSL_VERSION}"; puts "OpenSSL Library Version - #{OpenSSL::OPENSSL_LIBRARY_VERSION}"'
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
bundle exec rake parallel:spec[2]