Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add CI #13

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
41 changes: 41 additions & 0 deletions .github/workflows/build.yml
@@ -0,0 +1,41 @@
name: Build
on:
pull_request: {}
push:
branches:
- master

jobs:
build:
name: Build
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Determine Ruby version
id: ruby_version
run: |
echo "::set-output name=RUBY_VERSION::$(cat .ruby-version)"
- name: Set up build cache (bundler)
uses: actions/cache@v1
with:
path: vendor/bundle
key: ${{ runner.os }}-bundler
- name: Set up sqlite
run: sudo apt-get install libsqlite3-dev -y
- name: Set up Ruby
uses: actions/setup-ruby@v1
with:
ruby-version: ${{ steps.ruby_version.outputs.RUBY_VERSION }}
- name: Set up RubyGems
run: |
echo "gem: --no-document" > ~/.gemrc
- name: Set up Bundler
run: |
gem install bundler
bundle config path "vendor/bundle"
bundle config jobs "$(nproc)"
- name: Install dependencies (bundler)
run: bundle install
- name: Run tests
run: bundle exec rake test
1 change: 1 addition & 0 deletions .ruby-version
@@ -0,0 +1 @@
2.6.6
4 changes: 4 additions & 0 deletions Gemfile
Expand Up @@ -14,3 +14,7 @@ gemspec
# gem 'byebug', group: [:development, :test]
#
gem 'rails', '~> 6.0'

group :development, :test do
gem 'sqlite3'
end