1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52
|
name: Unit Tests
on: [push, pull_request, workflow_dispatch]
jobs:
build:
name: "Ruby: ${{ matrix.ruby }} OS: ${{ matrix.os }}"
runs-on: ${{ matrix.os }}
container: ${{ matrix.container }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
# 3.0 is interpreted as 3
ruby: ["3.0", 3.1, 3.2, 3.3, 3.4]
include:
- os: ubuntu-latest
container: ruby:2.2
ruby: 2.2
- os: ubuntu-latest
container: ruby:2.3
ruby: 2.3
- os: ubuntu-latest
container: ruby:2.4
ruby: 2.4
- os: ubuntu-latest
container: ruby:2.5
ruby: 2.5
- os: ubuntu-latest
container: ruby:2.6
ruby: 2.6
- os: ubuntu-latest
container: ruby:2.7
ruby: 2.7
steps:
- name: Checkout
uses: actions/checkout@v1
- name: Install Ruby & 'bundle install'
if: matrix.container == null
uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby }}
bundler-cache: true
- name: Bundle install
if: matrix.container != null
run: bundle install --jobs=4 --retry=3
- name: Run Test
run: |
ruby -v
bundle exec rake
env:
CI: true
|