|
1 |
| -name: CI |
| 1 | +name: Ruby CI |
2 | 2 |
|
3 | 3 | on:
|
4 | 4 | pull_request:
|
|
7 | 7 | workflow_dispatch:
|
8 | 8 |
|
9 | 9 | jobs:
|
10 |
| - test: |
| 10 | + lint: |
| 11 | + name: Lint |
| 12 | + runs-on: ubuntu-latest |
| 13 | + |
| 14 | + steps: |
| 15 | + - uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4 |
| 16 | + |
| 17 | + - uses: ruby/setup-ruby@v1 |
| 18 | + with: |
| 19 | + ruby-version: '3.3' |
| 20 | + rubygems: latest |
| 21 | + bundler: 2 |
| 22 | + bundler-cache: true |
| 23 | + |
| 24 | + - run: bundle exec standardrb |
| 25 | + |
| 26 | + required-ubuntu: |
11 | 27 | name: Ruby ${{ matrix.ruby }} - ${{ matrix.os }}
|
| 28 | + |
12 | 29 | strategy:
|
13 | 30 | fail-fast: false
|
14 | 31 | matrix:
|
15 | 32 | os:
|
16 |
| - - macos-latest |
17 | 33 | - ubuntu-20.04
|
| 34 | + - ubuntu-22.04 |
| 35 | + - ubuntu-24.04 |
18 | 36 | ruby:
|
19 |
| - - '2.4' |
20 |
| - - '2.5' |
21 | 37 | - '2.6'
|
22 | 38 | - '2.7'
|
23 |
| - - '3.0' |
24 | 39 | - '3.1'
|
25 | 40 | - '3.2'
|
26 | 41 | - '3.3'
|
27 |
| - - head |
28 | 42 | - jruby
|
29 |
| - - jruby-head |
30 | 43 | - truffleruby
|
31 | 44 | include:
|
32 |
| - - ruby: head |
33 |
| - continue-on-error: true |
34 |
| - - ruby: jruby-head |
35 |
| - continue-on-error: true |
36 |
| - - os: windows-latest |
37 |
| - ruby: mingw |
38 |
| - - os: windows-latest |
39 |
| - ruby: mswin |
40 |
| - - os: windows-latest |
41 |
| - ruby: jruby |
| 45 | + - ruby: jruby |
| 46 | + os: ubuntu-22.04 |
42 | 47 | continue-on-error: true
|
43 |
| - - os: ubuntu-22.04 |
44 |
| - ruby: head |
| 48 | + - ruby: truffleruby |
| 49 | + os: ubuntu-22.04 |
45 | 50 | continue-on-error: true
|
46 |
| - - os: ubuntu-22.04 |
47 |
| - ruby: '3.1' |
48 |
| - - os: ubuntu-22.04 |
49 |
| - ruby: '3.2' |
50 |
| - - os: ubuntu-22.04 |
51 |
| - ruby: '3.3' |
52 |
| - standardrb: true |
53 | 51 |
|
54 | 52 | runs-on: ${{ matrix.os }}
|
55 | 53 | continue-on-error: ${{ matrix.continue-on-error || false }}
|
56 | 54 |
|
57 | 55 | steps:
|
58 |
| - - uses: actions/checkout@v4 |
| 56 | + - uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4 |
| 57 | + - uses: ruby/setup-ruby@v1 |
| 58 | + with: |
| 59 | + ruby-version: ${{ matrix.ruby }} |
| 60 | + rubygems: latest |
| 61 | + bundler: 2 |
| 62 | + bundler-cache: true |
| 63 | + |
| 64 | + - run: bundle exec ruby -S rake test --trace |
| 65 | + |
| 66 | + required-macos: |
| 67 | + name: Ruby ${{ matrix.ruby }} - ${{ matrix.os }} |
| 68 | + |
| 69 | + strategy: |
| 70 | + fail-fast: false |
| 71 | + matrix: |
| 72 | + os: |
| 73 | + - macos-12 |
| 74 | + - macos-13 |
| 75 | + - macos-14 |
| 76 | + ruby: |
| 77 | + - '2.6' |
| 78 | + - '2.7' |
| 79 | + - '3.1' |
| 80 | + - '3.2' |
| 81 | + - '3.3' |
| 82 | + |
| 83 | + runs-on: ${{ matrix.os }} |
| 84 | + |
| 85 | + steps: |
| 86 | + - uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4 |
| 87 | + - uses: ruby/setup-ruby@v1 |
| 88 | + with: |
| 89 | + ruby-version: ${{ matrix.ruby }} |
| 90 | + rubygems: latest |
| 91 | + bundler: 2 |
| 92 | + bundler-cache: true |
| 93 | + |
| 94 | + - run: bundle exec ruby -S rake test --trace |
| 95 | + |
| 96 | + # Windows 2019 / Ruby 3.0 does not include libyaml, so we are removing it from the test |
| 97 | + # cycle. All other versions succeed on Windows 2019 and Ruby 3.0 succeeds on Windows |
| 98 | + # 2022. https://github.com/ruby/setup-ruby/issues/641 |
| 99 | + required-windows: |
| 100 | + name: Ruby ${{ matrix.ruby }} - ${{ matrix.os }} |
| 101 | + strategy: |
| 102 | + fail-fast: false |
| 103 | + matrix: |
| 104 | + os: |
| 105 | + - windows-2019 |
| 106 | + - windows-2022 |
| 107 | + ruby: |
| 108 | + - '2.6' |
| 109 | + - '2.7' |
| 110 | + - '3.1' |
| 111 | + - '3.2' |
| 112 | + - '3.3' |
| 113 | + - mswin |
| 114 | + - ucrt |
| 115 | + include: |
| 116 | + - ruby: mingw |
| 117 | + os: windows-2022 |
| 118 | + - ruby: '3.0' |
| 119 | + os: windows-2022 |
| 120 | + |
| 121 | + runs-on: ${{ matrix.os }} |
| 122 | + |
| 123 | + steps: |
| 124 | + - uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4 |
59 | 125 | - uses: ruby/setup-ruby@v1
|
60 | 126 | with:
|
61 | 127 | ruby-version: ${{ matrix.ruby }}
|
62 | 128 | rubygems: latest
|
| 129 | + bundler: 2 |
63 | 130 | bundler-cache: true
|
64 | 131 |
|
65 | 132 | - run: bundle exec ruby -S rake test --trace
|
66 | 133 |
|
67 |
| - - if: matrix.standardrb == true |
68 |
| - run: bundle exec standardrb |
| 134 | + ruby-head-optional: |
| 135 | + name: Ruby ${{ matrix.ruby }} - ${{ matrix.os }} (optional) |
| 136 | + |
| 137 | + strategy: |
| 138 | + fail-fast: false |
| 139 | + |
| 140 | + matrix: |
| 141 | + ruby: |
| 142 | + - head |
| 143 | + os: |
| 144 | + - macos-latest |
| 145 | + - ubuntu-latest |
| 146 | + - windows-latest |
| 147 | + |
| 148 | + continue-on-error: true |
| 149 | + runs-on: ${{ matrix.os }} |
| 150 | + |
| 151 | + steps: |
| 152 | + - uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4 |
| 153 | + - uses: ruby/setup-ruby@v1 |
| 154 | + with: |
| 155 | + ruby-version: ${{ matrix.ruby }} |
| 156 | + rubygems: latest |
| 157 | + bundler: 2 |
| 158 | + bundler-cache: true |
| 159 | + |
| 160 | + - run: bundle exec ruby -S rake test --trace |
0 commit comments