WIP: support Ruby 2.4 #9
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: Test | |
| on: | |
| push: | |
| branches: | |
| - main | |
| pull_request: | |
| jobs: | |
| test: | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| ruby: ['3.4', '3.3', '3.2'] | |
| os: [ubuntu-latest, macos-latest, windows-latest] | |
| include: | |
| - os: ubuntu-latest | |
| ruby: '2.7.1' | |
| - os: ubuntu-latest | |
| ruby: '2.4.2' | |
| - os: windows-latest | |
| ruby: '2.7.1' | |
| - os: windows-latest | |
| ruby: '2.4.2' | |
| runs-on: ${{ matrix.os }} | |
| name: Test with Ruby ${{ matrix.ruby }} on ${{ matrix.os }} | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: ruby/setup-ruby@v1 | |
| with: | |
| ruby-version: ${{ matrix.ruby }} | |
| bundler-cache: true | |
| - name: Test | |
| run: bundle exec rake | |
| build: | |
| runs-on: ubuntu-latest | |
| name: Build gem | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: ruby/setup-ruby@v1 | |
| with: | |
| ruby-version: '3.4' | |
| bundler-cache: true | |
| - name: Build | |
| run: bundler exec rake build | |
| - uses: actions/upload-artifact@v4 | |
| with: | |
| name: gem | |
| path: pkg/*.gem | |
| gem-test: | |
| needs: build | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| ruby: ['3.4', '3.3', '3.2', '2.7.1', '2.4.2'] | |
| # macOS is excluded because of the difficulty in assuming a macOS shell behavior. | |
| os: [ubuntu-latest, windows-latest] | |
| include: | |
| - os: ubuntu-latest | |
| shell: bash | |
| - os: windows-latest | |
| shell: cmd | |
| - ruby: '2.7.1' | |
| fluentd: '1.11.1' | |
| - ruby: '2.4.2' | |
| fluentd: '1.0.2' | |
| runs-on: ${{ matrix.os }} | |
| name: Gem test with Ruby ${{ matrix.ruby }} on ${{ matrix.os }} | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: ruby/setup-ruby@v1 | |
| with: | |
| ruby-version: ${{ matrix.ruby }} | |
| - uses: actions/download-artifact@v4 | |
| with: | |
| name: gem | |
| path: pkg | |
| - name: Install specific version Fluentd | |
| if: ${{ matrix.fluentd != '' }} | |
| run: gem install fluentd --version ${{ matrix.fluentd }} | |
| - name: Install gem | |
| run: gem install pkg/* | |
| - name: Test command (bash) | |
| if: ${{ matrix.shell == 'bash' }} | |
| run: test/script/command-test.bash | |
| shell: bash | |
| - name: Test command (cmd) | |
| if: ${{ matrix.shell == 'cmd' }} | |
| run: test/script/command-test.bat | |
| shell: cmd |