Merge pull request #21 from mi-wada/use-actions_cache_v4 #57
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
name: CI | |
on: | |
push: | |
branches: | |
- main | |
paths-ignore: | |
- 'LICENSE' | |
- '**.md' | |
pull_request: | |
paths-ignore: | |
- 'LICENSE' | |
- '**.md' | |
jobs: | |
test: | |
strategy: | |
fail-fast: false | |
matrix: | |
os: [ubuntu-latest] | |
ruby: ['2.5', '2.6', '2.7', '3.0', '3.1', '3.2', '3.3'] | |
runs-on: ${{ matrix.os }} | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Set up Ruby ${{ matrix.ruby }} | |
uses: ruby/setup-ruby@v1 | |
with: | |
ruby-version: ${{ matrix.ruby }} | |
- name: Generate Gemfile.lock | |
run: bundle lock --lockfile=Gemfile.lock | |
- uses: actions/cache@v4 | |
with: | |
path: vendor/bundle | |
key: bundle-use-ruby-${{ matrix.os }}-${{ matrix.ruby }}-${{ hashFiles('**/Gemfile.lock') }} | |
restore-keys: | | |
bundle-use-ruby-${{ matrix.os }}-${{ matrix.ruby }}- | |
- run: bundle check --path .bundle || bundle install --path .bundle | |
- name: MiniTest | |
run: bundle exec rake no_slow_test | |
timeout-minutes: 5 | |
slow_test: | |
strategy: | |
fail-fast: false | |
matrix: | |
os: [ubuntu-latest] | |
ruby: ['2.5', '2.6', '2.7', '3.0', '3.1', '3.2', '3.3'] | |
runs-on: ${{ matrix.os }} | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Set up Ruby ${{ matrix.ruby }} | |
uses: ruby/setup-ruby@v1 | |
with: | |
ruby-version: ${{ matrix.ruby }} | |
- name: Generate Gemfile.lock | |
run: bundle lock --lockfile=Gemfile.lock | |
- uses: actions/cache@v4 | |
with: | |
path: vendor/bundle | |
key: bundle-use-ruby-${{ matrix.os }}-${{ matrix.ruby }}-${{ hashFiles('**/Gemfile.lock') }} | |
restore-keys: | | |
bundle-use-ruby-${{ matrix.os }}-${{ matrix.ruby }}- | |
- run: bundle check --path .bundle || bundle install --path .bundle | |
- name: MiniTest | |
run: | | |
TESTFILES=$(ls -d test/jct/slow_test/*) | |
bundle exec ruby -e "%w[$TESTFILES].each { |test_file| load test_file }" | |
timeout-minutes: 60 |