Automated testing with a GitHub Action
This commit is contained in:
parent
eaf6ae78c8
commit
5bde6600f1
33
.github/workflows/ruby.yml
vendored
Normal file
33
.github/workflows/ruby.yml
vendored
Normal file
@ -0,0 +1,33 @@
|
|||||||
|
name: Ruby
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches: [ master, develop ]
|
||||||
|
pull_request:
|
||||||
|
branches: [ develop ]
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
test:
|
||||||
|
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
|
strategy:
|
||||||
|
matrix:
|
||||||
|
include:
|
||||||
|
- rails-version: "5.2.0"
|
||||||
|
- rails-version: "6.0.0"
|
||||||
|
- rails-version: "6.1.0"
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v2
|
||||||
|
- name: Set up Ruby
|
||||||
|
env:
|
||||||
|
RAILS_VERSION: ${{ matrix.rails-version }}
|
||||||
|
uses: ruby/setup-ruby@v1
|
||||||
|
bundler-cache: true # runs 'bundle install' and caches installed gems automatically
|
||||||
|
- name: Install JS dependencies
|
||||||
|
run: yarn
|
||||||
|
- name: Create database
|
||||||
|
run: RAILS_ENV=test bundle exec rake db:create db:migrate
|
||||||
|
- name: Run tests
|
||||||
|
run: RAILS_ENV=test bundle exec rake test
|
Loading…
x
Reference in New Issue
Block a user