Skip to content

Commit

Permalink
Create ci.yml (#10)
Browse files Browse the repository at this point in the history
* Create ci.yml

* Update ci.yml

* Update ci.yml

* Update ci.yml

* removed rubyversion

* Added versions

* f
  • Loading branch information
keshavbiswa authored Jul 30, 2023
1 parent 732c25a commit f33bed5
Show file tree
Hide file tree
Showing 2 changed files with 42 additions and 2 deletions.
42 changes: 42 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
name: CI

on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
ruby: [ 3.0 ]
rails_version:
- ~> 5.2.0
- ~> 6.0.0
- ~> 6.1.0
- ~> 7.0.0
steps:
- uses: actions/checkout@v2

- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby }}

- name: Install dependencies
run: |
gem install bundler
bundle install --jobs 4 --retry 3
- name: Setup DB
run: |
cd spec/dummy
bundle exec rake db:create db:migrate
env:
RAILS_ENV: test

- name: Run tests
run: bundle exec rspec
env:
RAILS_VERSION: ${{ matrix.rails_version }}
2 changes: 0 additions & 2 deletions spec/dummy/Gemfile
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
source "https://rubygems.org"
git_source(:github) { |repo| "https://github.com/#{repo}.git" }

ruby "3.2.0"

# Bundle edge Rails instead: gem "rails", github: "rails/rails", branch: "main"
gem "rails", "~> 7.0.4", ">= 7.0.4.3"

Expand Down

0 comments on commit f33bed5

Please sign in to comment.