Merge pull request #474 from kachick/ruby3.3 #268
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
# https://docs.github.com/ja/actions/reference/workflow-syntax-for-github-actions | |
name: CI | |
on: | |
push: | |
branches: | |
- main | |
paths: | |
- '.github/workflows/ci.yml' | |
- 'lib/**' | |
- 'test/**' | |
- 'spec/**' | |
- '.rspec' | |
- '**.gemspec' | |
- 'Gemfile' | |
- 'Rakefile' | |
- '.ruby-version' | |
pull_request: | |
paths: | |
- '.github/workflows/ci.yml' | |
- 'lib/**' | |
- 'test/**' | |
- 'spec/**' | |
- '.rspec' | |
- '**.gemspec' | |
- 'Gemfile' | |
- 'Rakefile' | |
- '.ruby-version' | |
jobs: | |
test: | |
timeout-minutes: 15 | |
strategy: | |
fail-fast: false | |
# Syntax https://docs.github.com/en/actions/using-jobs/using-a-matrix-for-your-jobs | |
matrix: | |
os: ['ubuntu-latest'] | |
# Due to https://github.com/actions/runner/issues/849, we have to use quotes for 'n.0' | |
ruby: ['head', '3.3', '3.2'] | |
# # Disabled macos runner. This gem should work because of it is written in pure ruby :). And the runner is too slow and often be stacked. | |
# include: | |
# - os: 'macos-latest' | |
# ruby: '3.3' | |
# # Windows CI takes longtime. It has been succeeded in #223, it is enough for now. | |
# - os: 'windows-latest' | |
# ruby: '3.3' | |
runs-on: ${{ matrix.os }} | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: ruby/setup-ruby@v1 | |
env: | |
# https://github.com/kachick/ruby-ulid/blob/104834846baf5caa1e8536a11c43acdd56fc849c/CONTRIBUTING.md#adding-dependencies-for-this-gem | |
BUNDLE_WITHOUT: development | |
with: | |
ruby-version: ${{ matrix.ruby }} | |
bundler-cache: true # runs 'bundle install' and caches installed gems automatically | |
- run: bundle exec rake test_all --suppress-backtrace='\/bundle' | |
env: | |
# Need same specifying for now(want to squash) | |
BUNDLE_WITHOUT: development |