| 1 |
name: CI |
| 2 |
on: [push, pull_request] |
| 3 |
|
| 4 |
jobs: |
| 5 |
linters: |
| 6 |
name: Linters |
| 7 |
|
| 8 |
runs-on: ubuntu-latest |
| 9 |
steps: |
| 10 |
- name: Checkout code |
| 11 |
uses: actions/checkout@v3 |
| 12 |
|
| 13 |
- name: Setup Ruby and install gems |
| 14 |
uses: ruby/setup-ruby@v1 |
| 15 |
with: |
| 16 |
ruby-version: 2.7 |
| 17 |
bundler-cache: true |
| 18 |
|
| 19 |
- name: Setup Node |
| 20 |
uses: actions/setup-node@v3 |
| 21 |
|
| 22 |
- name: Run linters |
| 23 |
run: | |
| 24 |
bundle exec rake standard:fix |
| 25 |
|
| 26 |
tests: |
| 27 |
name: Tests |
| 28 |
strategy: |
| 29 |
fail-fast: false |
| 30 |
matrix: |
| 31 |
os: |
| 32 |
- ubuntu-latest |
| 33 |
- macos-latest |
| 34 |
|
| 35 |
ruby: |
| 36 |
- 2.5 |
| 37 |
- 2.6 |
| 38 |
- 2.7 |
| 39 |
- '3.0' |
| 40 |
- 3.1 |
| 41 |
- 3.2 |
| 42 |
- 3.3 |
| 43 |
|
| 44 |
runs-on: ${{ matrix.os }} |
| 45 |
|
| 46 |
steps: |
| 47 |
- name: Checkout code |
| 48 |
uses: actions/checkout@v3 |
| 49 |
|
| 50 |
- name: Setup Ruby and install gems |
| 51 |
uses: ruby/setup-ruby@v1 |
| 52 |
with: |
| 53 |
ruby-version: ${{ matrix.ruby }} |
| 54 |
bundler-cache: true |
| 55 |
|
| 56 |
- name: Setup Node |
| 57 |
uses: actions/setup-node@v3 |
| 58 |
|
| 59 |
- name: Run tests |
| 60 |
env: |
| 61 |
EXECJS_RUNTIME: MiniRacer |
| 62 |
run: bundle exec rake spec |
| 63 |
|
| 64 |
- name: Run tests on EXECJS_RUNTIME=Node |
| 65 |
if: ${{ matrix.ruby == '2.7' }} |
| 66 |
env: |
| 67 |
EXECJS_RUNTIME: Node |
| 68 |
run: bundle exec rake spec |