42 lines (41 loc) · 1.17 KB
/
ci.yml
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
name: Unit Tests
on: [push, pull_request]
jobs:
build:
name: "Ruby: ${{ matrix.ruby }} OS: ${{ matrix.os }}"
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [macos-latest, windows-latest, ubuntu-latest]
ruby: ["2.4", "2.5", "2.6", "2.7"]
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Select Ruby Version
uses: eregon/use-ruby-action@master
with:
ruby-version: ${{ matrix.ruby }}
base: update
- name: Update RubyGems & Bundler
run: gem update --system --no-document --conservative
- name: Install Dependencies
run: bundle install --jobs=3 --retry=3
- name: Run Test
run: |
ruby -v
bundle exec rake
env:
CI: true
build_ruby3:
name: "Ruby: 3.0 OS: Linux"
runs-on: ubuntu-latest
container: ruby:3.0-rc-alpine
steps:
- uses: actions/checkout@v2
- run: apk add -U build-base
- run: gem update --system --no-document --conservative
- run: bundle install --jobs=3 --retry=3
- run: ruby -v && bundle exec rake
env:
CI: true