diff --git a/.github/workflows/macos-test.yaml b/.github/workflows/macos-test.yaml deleted file mode 100644 index 9f45724fcc..0000000000 --- a/.github/workflows/macos-test.yaml +++ /dev/null @@ -1,34 +0,0 @@ -name: Testing on macOS - -on: - push: - branches: [master] - pull_request: - branches: [master] - -jobs: - test: - runs-on: ${{ matrix.os }} - continue-on-error: ${{ matrix.experimental }} - strategy: - fail-fast: false - matrix: - ruby-version: ['3.3', '3.2', '3.1', '3.0', '2.7'] - os: [macos-latest] - experimental: [true] - include: - - ruby-version: head - os: macos-latest - experimental: true - - name: Unit testing with Ruby ${{ matrix.ruby-version }} on ${{ matrix.os }} - steps: - - uses: actions/checkout@v3 - - name: Set up Ruby - uses: ruby/setup-ruby@v1 - with: - ruby-version: ${{ matrix.ruby-version }} - - name: Install dependencies - run: bundle install - - name: Run tests - run: bundle exec rake test diff --git a/.github/workflows/test-ruby-head.yaml b/.github/workflows/test-ruby-head.yaml new file mode 100644 index 0000000000..6aaec99e93 --- /dev/null +++ b/.github/workflows/test-ruby-head.yaml @@ -0,0 +1,31 @@ +name: Test + +on: + schedule: + - cron: '11 14 * * 0' + workflow_dispatch: + +jobs: + test: + runs-on: ${{ matrix.os }} + continue-on-error: true + strategy: + fail-fast: false + matrix: + os: ['ubuntu-latest', 'macos-latest', 'windows-latest'] + ruby-version: ['head'] + + name: Ruby ${{ matrix.ruby-version }} on ${{ matrix.os }} + steps: + - uses: actions/checkout@v3 + - name: Set up Ruby + uses: ruby/setup-ruby@v1 + with: + ruby-version: ${{ matrix.ruby-version }} + - name: Install addons + if: ${{ matrix.os == 'ubuntu-latest' }} + run: sudo apt-get install libgmp3-dev libcap-ng-dev + - name: Install dependencies + run: bundle install + - name: Run tests + run: bundle exec rake test TESTOPTS=-v diff --git a/.github/workflows/linux-test.yaml b/.github/workflows/test.yaml similarity index 61% rename from .github/workflows/linux-test.yaml rename to .github/workflows/test.yaml index 745ce9b1ca..0532804bc2 100644 --- a/.github/workflows/linux-test.yaml +++ b/.github/workflows/test.yaml @@ -1,4 +1,4 @@ -name: Testing on Ubuntu +name: Test on: push: @@ -9,19 +9,14 @@ on: jobs: test: runs-on: ${{ matrix.os }} - continue-on-error: ${{ matrix.experimental }} + continue-on-error: false strategy: fail-fast: false matrix: + os: ['ubuntu-latest', 'macos-latest', 'windows-latest'] ruby-version: ['3.3', '3.2', '3.1', '3.0', '2.7'] - os: [ubuntu-latest] - experimental: [false] - include: - - ruby-version: head - os: ubuntu-latest - experimental: true - name: Unit testing with Ruby ${{ matrix.ruby-version }} on ${{ matrix.os }} + name: Ruby ${{ matrix.ruby-version }} on ${{ matrix.os }} steps: - uses: actions/checkout@v3 - name: Set up Ruby @@ -29,8 +24,9 @@ jobs: with: ruby-version: ${{ matrix.ruby-version }} - name: Install addons + if: ${{ matrix.os == 'ubuntu-latest' }} run: sudo apt-get install libgmp3-dev libcap-ng-dev - name: Install dependencies run: bundle install - name: Run tests - run: bundle exec rake test + run: bundle exec rake test TESTOPTS=-v diff --git a/.github/workflows/windows-test.yaml b/.github/workflows/windows-test.yaml deleted file mode 100644 index a1941be392..0000000000 --- a/.github/workflows/windows-test.yaml +++ /dev/null @@ -1,49 +0,0 @@ -name: Testing on Windows - -on: - push: - branches: [master] - pull_request: - branches: [master] - -jobs: - test: - runs-on: ${{ matrix.os }} - continue-on-error: ${{ matrix.experimental }} - strategy: - fail-fast: false - matrix: - ruby-version: ['3.3', '3.2', '3.1', '2.7'] - os: - - windows-latest - experimental: [false] - include: - - ruby-version: head - os: windows-latest - experimental: true - - ruby-version: '3.0.3' - os: windows-latest - experimental: false - # On Ruby 3.0, we need to use fiddle 1.0.8 or later to retrieve correct - # error code. In addition, we have to specify the path of fiddle by RUBYLIB - # because RubyInstaller loads Ruby's bundled fiddle before initializing gem. - # See also: - # * https://github.com/ruby/fiddle/issues/72 - # * https://bugs.ruby-lang.org/issues/17813 - # * https://github.com/oneclick/rubyinstaller2/blob/8225034c22152d8195bc0aabc42a956c79d6c712/lib/ruby_installer/build/dll_directory.rb - ruby-lib-opt: RUBYLIB=%RUNNER_TOOL_CACHE%/Ruby/3.0.3/x64/lib/ruby/gems/3.0.0/gems/fiddle-1.1.0/lib - - name: Unit testing with Ruby ${{ matrix.ruby-version }} on ${{ matrix.os }} - steps: - - uses: actions/checkout@v3 - - name: Set up Ruby - uses: ruby/setup-ruby@v1 - with: - ruby-version: ${{ matrix.ruby-version }} - - name: Add Fiddle 1.1.0 - if: ${{ matrix.ruby-version == '3.0.3' }} - run: gem install fiddle --version 1.1.0 - - name: Install dependencies - run: ridk exec bundle install - - name: Run tests - run: bundle exec rake test TESTOPTS=-v ${{ matrix.ruby-lib-opt }}