Skip to content
This repository has been archived by the owner on May 4, 2024. It is now read-only.

Merge pull request #86 from st0012/st0012-patch-1 #451

Merge pull request #86 from st0012/st0012-patch-1

Merge pull request #86 from st0012/st0012-patch-1 #451

Workflow file for this run

name: Ruby
on:
workflow_dispatch:
push:
branches:
- master
pull_request:
jobs:
test:
name: Test on ruby ${{ matrix.ruby_version }} and rails ${{ matrix.rails_version }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
rails_version: ['5.2', '6.0.0', '6.1.0']
ruby_version: ['2.7', '3.0']
os: [ubuntu-latest]
exclude:
- ruby_version: '3.0'
rails_version: '5.2'
steps:
- uses: actions/checkout@v1
- name: Set up Ruby ${{ matrix.ruby_version }}
uses: actions/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby_version }}
- name: Install sqlite
run: |
# See https://github.community/t5/GitHub-Actions/ubuntu-latest-Apt-repository-list-issues/td-p/41122/page/2
for apt_file in `grep -lr microsoft /etc/apt/sources.list.d/`; do sudo rm $apt_file; done
sudo apt-get update
sudo apt-get install libsqlite3-dev
- name: Build with Rails ${{ matrix.rails_version }}
env:
RAILS_VERSION: ${{ matrix.rails_version }}
run: |
gem install bundler
bundle install --jobs 4 --retry 3
- name: Run test with Rails ${{ matrix.rails_version }}
env:
RAILS_VERSION: ${{ matrix.rails_version }}
run: make test
- name: Publish Test Coverage
uses: paambaati/[email protected]
env:
CC_TEST_REPORTER_ID: ${{ secrets.CC_TEST_REPORTER_ID }}
if: ${{ env.CC_TEST_REPORTER_ID != '' }}
with:
# the coverage result should already be generated by the previous step
# so we don't need to provide and command in the step
# this is just a placeholder to avoid it run the default `yarn coverage` command
coverageCommand: ruby -v
debug: true