Skip to content

Commit 42087e7

Browse files
committed
Add dummy Rails app test suite and add Github CI workflow
1 parent 5d383d8 commit 42087e7

36 files changed

+330
-92
lines changed

.github/workflows/test.yml

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
name: Test
2+
on:
3+
push:
4+
branches: ['master']
5+
pull_request:
6+
7+
jobs:
8+
test:
9+
runs-on: ubuntu-latest
10+
11+
env:
12+
RAILS_ENV: test
13+
14+
strategy:
15+
fail-fast: false
16+
matrix:
17+
include:
18+
### TEST RUBY VERSIONS
19+
- ruby: "2.5"
20+
- ruby: "2.6"
21+
- ruby: "2.7"
22+
- ruby: "3.0"
23+
- ruby: "3.1"
24+
- ruby: "3.2"
25+
### TEST RAILS VERSIONS
26+
- ruby: "2.6"
27+
env:
28+
RAILS_VERSION: "5.2"
29+
- ruby: "2.6"
30+
env:
31+
RAILS_VERSION: "6.0"
32+
- ruby: "2.6"
33+
env:
34+
RAILS_VERSION: "6.1"
35+
- ruby: "3.2"
36+
env:
37+
RAILS_VERSION: "7.0"
38+
- ruby: "3.2"
39+
env:
40+
RAILS_VERSION: "7.1"
41+
42+
steps:
43+
- uses: actions/checkout@v3
44+
45+
- name: Install ruby
46+
uses: ruby/setup-ruby@v1
47+
with:
48+
ruby-version: "${{ matrix.ruby }}"
49+
bundler-cache: false ### not compatible with ENV style gemfile
50+
51+
- name: Run test
52+
run: |
53+
bundle install
54+
bundle exec rake test

.gitignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,3 +10,7 @@
1010
/test/*.sqlite3*
1111
/production/*.sqlite3*
1212
.DS_Store
13+
/test/dummy_app/**/*.sqlite3*
14+
/test/dummy_app/**/*.log
15+
/test/dummy_app/tmp/
16+
Gemfile.lock

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
- Fix Litesearch tests
66
- Suppress chatty Litejob exit detector when there are no jobs in flight
77
- Tidy up the test folder
8+
- [#xx](https://github.com/oldmoe/litestack/pull/xx) - Add dummy Rails app for test suite and Github CI workflow
89

910
## [0.4.1] - 2023-10-11
1011

Gemfile

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,3 +4,9 @@ source "https://rubygems.org"
44

55
# Specify your gem's dependencies in litestack.gemspec
66
gemspec
7+
8+
def get_env(name)
9+
(ENV[name] && !ENV[name].empty?) ? ENV[name] : nil
10+
end
11+
12+
gem 'rails', get_env("RAILS_VERSION")

Gemfile.lock

Lines changed: 0 additions & 92 deletions
This file was deleted.

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
![litestack](https://github.com/oldmoe/litestack/blob/master/assets/litestack_logo_teal_large.png?raw=true)
22

3+
<a href='https://github.com/oldmoe/litestack/actions' target='_blank'><img src="https://github.com/oldmoe/litestack/actions/workflows/test.yml/badge.svg?branch=master" style="max-width:100%;" height='21' style='border:0px;height:21px;' border='0' alt="CI Status"></a>
4+
35
All your data infrastructure, in a gem!
46

57
Litestack is a Ruby gem that provides both Ruby and Ruby on Rails applications an all-in-one solution for web application data infrastructure. It exploits the power and embeddedness of SQLite to deliver a full-fledged SQL database, a fast cache , a robust job queue, a reliable message broker, a full text search engine and a metrics platform all in a single package.

test/dummy_app/Rakefile

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
#!/usr/bin/env rake
2+
# Add your own tasks in files placed in lib/tasks ending in .rake,
3+
# for example lib/tasks/capistrano.rake, and they will automatically be available to Rake.
4+
5+
require File.expand_path('../config/application', __FILE__)
6+
7+
Dummy::Application.load_tasks
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
//= link_tree ../images
2+
//= link_directory ../javascripts .js
3+
//= link_directory ../stylesheets .css .scss

test/dummy_app/app/assets/javascripts/application.js

Whitespace-only changes.
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
/*
2+
*= require_self
3+
*/

0 commit comments

Comments
 (0)