Skip to content

Commit

Permalink
chore: update CI for MSSQL
Browse files Browse the repository at this point in the history
  • Loading branch information
blocknotes committed Nov 1, 2023
1 parent 8b875f1 commit d2578d3
Show file tree
Hide file tree
Showing 4 changed files with 384 additions and 0 deletions.
56 changes: 56 additions & 0 deletions .github/workflows/specs_mssql_70.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
---
name: Specs Rails 7.0 MSSQL

on:
pull_request:
branches: [main]
push:
branches: [main]

jobs:
tests:
runs-on: ubuntu-latest

strategy:
matrix:
ruby: ['3.0', '3.1', '3.2']
gemfile: ['rails_7_0_mssql']

env:
BUNDLE_GEMFILE: ${{ github.workspace }}/gemfiles/${{ matrix.gemfile }}.gemfile
DB_TEST: mssql
MSSQL_DB_HOST: 127.0.0.1
MSSQL_DB_USERNAME: sa
MSSQL_DB_PASSWORD: Pa%%w0rd
RAILS: '7.0'

services:
postgres:
image: mcr.microsoft.com/mssql/server:2022-latest
env:
ACCEPT_EULA: 'Y'
SA_PASSWORD: Pa%%w0rd
ports:
- 1433:1433

steps:
- name: Install FreeTDS
run: sudo apt-get install -y freetds-dev freetds-bin

- name: Checkout repository
uses: actions/checkout@v4

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

- name: Create database
run: bundle exec rails db:create

- name: Apply migrations
run: bundle exec rails db:migrate

- name: Run tests
run: bundle exec rspec --profile
6 changes: 6 additions & 0 deletions Appraisals
Original file line number Diff line number Diff line change
Expand Up @@ -39,3 +39,9 @@ appraise 'rails-7_1-mysql' do
gem 'mysql2'
gem 'rails', '~> 7.1.0'
end

appraise 'rails-7_0-mssql' do
gem 'activerecord-sqlserver-adapter', '7.0.3.0'
gem 'rails', '~> 7.0.0'
gem 'tiny_tds'
end
26 changes: 26 additions & 0 deletions gemfiles/rails_7_0_mssql.gemfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# This file was generated by Appraisal

source "https://rubygems.org"

gem "activerecord-sqlserver-adapter", "7.0.3.0"
gem "rails", "~> 7.0.0"
gem "tiny_tds"

group :development, :test do
gem "simplecov"
gem "simplecov-lcov"
gem "capybara"
gem "rspec_junit_formatter"
gem "rspec-rails"
gem "selenium-webdriver"
gem "brakeman"
gem "fasterer"
gem "rubocop"
gem "rubocop-packaging"
gem "rubocop-performance"
gem "rubocop-rails"
gem "rubocop-rspec"
gem "pry-rails"
end

gemspec path: "../"
296 changes: 296 additions & 0 deletions gemfiles/rails_7_0_mssql.gemfile.lock
Original file line number Diff line number Diff line change
@@ -0,0 +1,296 @@
PATH
remote: ..
specs:
active_storage_db (1.2.0)
activestorage (>= 6.0)
rails (>= 6.0)

GEM
remote: https://rubygems.org/
specs:
actioncable (7.0.8)
actionpack (= 7.0.8)
activesupport (= 7.0.8)
nio4r (~> 2.0)
websocket-driver (>= 0.6.1)
actionmailbox (7.0.8)
actionpack (= 7.0.8)
activejob (= 7.0.8)
activerecord (= 7.0.8)
activestorage (= 7.0.8)
activesupport (= 7.0.8)
mail (>= 2.7.1)
net-imap
net-pop
net-smtp
actionmailer (7.0.8)
actionpack (= 7.0.8)
actionview (= 7.0.8)
activejob (= 7.0.8)
activesupport (= 7.0.8)
mail (~> 2.5, >= 2.5.4)
net-imap
net-pop
net-smtp
rails-dom-testing (~> 2.0)
actionpack (7.0.8)
actionview (= 7.0.8)
activesupport (= 7.0.8)
rack (~> 2.0, >= 2.2.4)
rack-test (>= 0.6.3)
rails-dom-testing (~> 2.0)
rails-html-sanitizer (~> 1.0, >= 1.2.0)
actiontext (7.0.8)
actionpack (= 7.0.8)
activerecord (= 7.0.8)
activestorage (= 7.0.8)
activesupport (= 7.0.8)
globalid (>= 0.6.0)
nokogiri (>= 1.8.5)
actionview (7.0.8)
activesupport (= 7.0.8)
builder (~> 3.1)
erubi (~> 1.4)
rails-dom-testing (~> 2.0)
rails-html-sanitizer (~> 1.1, >= 1.2.0)
activejob (7.0.8)
activesupport (= 7.0.8)
globalid (>= 0.3.6)
activemodel (7.0.8)
activesupport (= 7.0.8)
activerecord (7.0.8)
activemodel (= 7.0.8)
activesupport (= 7.0.8)
activerecord-sqlserver-adapter (7.0.3.0)
activerecord (~> 7.0.0)
tiny_tds
activestorage (7.0.8)
actionpack (= 7.0.8)
activejob (= 7.0.8)
activerecord (= 7.0.8)
activesupport (= 7.0.8)
marcel (~> 1.0)
mini_mime (>= 1.1.0)
activesupport (7.0.8)
concurrent-ruby (~> 1.0, >= 1.0.2)
i18n (>= 1.6, < 2)
minitest (>= 5.1)
tzinfo (~> 2.0)
addressable (2.8.5)
public_suffix (>= 2.0.2, < 6.0)
appraisal (2.5.0)
bundler
rake
thor (>= 0.14.0)
ast (2.4.2)
brakeman (6.0.1)
builder (3.2.4)
capybara (3.39.2)
addressable
matrix
mini_mime (>= 0.1.3)
nokogiri (~> 1.8)
rack (>= 1.6.0)
rack-test (>= 0.6.3)
regexp_parser (>= 1.5, < 3.0)
xpath (~> 3.2)
coderay (1.1.3)
colorize (0.8.1)
concurrent-ruby (1.2.2)
crass (1.0.6)
date (3.3.3)
diff-lcs (1.5.0)
docile (1.4.0)
erubi (1.12.0)
factory_bot (6.2.1)
activesupport (>= 5.0.0)
factory_bot_rails (6.2.0)
factory_bot (~> 6.2.0)
railties (>= 5.0.0)
fasterer (0.10.1)
colorize (~> 0.7)
ruby_parser (>= 3.19.1)
globalid (1.2.1)
activesupport (>= 6.1)
i18n (1.14.1)
concurrent-ruby (~> 1.0)
json (2.6.3)
language_server-protocol (3.17.0.3)
loofah (2.21.4)
crass (~> 1.0.2)
nokogiri (>= 1.12.0)
mail (2.8.1)
mini_mime (>= 0.1.1)
net-imap
net-pop
net-smtp
marcel (1.0.2)
matrix (0.4.2)
method_source (1.0.0)
mini_mime (1.1.5)
minitest (5.20.0)
net-imap (0.4.3)
date
net-protocol
net-pop (0.1.2)
net-protocol
net-protocol (0.2.1)
timeout
net-smtp (0.4.0)
net-protocol
nio4r (2.5.9)
nokogiri (1.15.4-arm64-darwin)
racc (~> 1.4)
parallel (1.23.0)
parser (3.2.2.4)
ast (~> 2.4.1)
racc
pry (0.14.2)
coderay (~> 1.1)
method_source (~> 1.0)
pry-rails (0.3.9)
pry (>= 0.10.4)
public_suffix (5.0.3)
racc (1.7.2)
rack (2.2.8)
rack-test (2.1.0)
rack (>= 1.3)
rails (7.0.8)
actioncable (= 7.0.8)
actionmailbox (= 7.0.8)
actionmailer (= 7.0.8)
actionpack (= 7.0.8)
actiontext (= 7.0.8)
actionview (= 7.0.8)
activejob (= 7.0.8)
activemodel (= 7.0.8)
activerecord (= 7.0.8)
activestorage (= 7.0.8)
activesupport (= 7.0.8)
bundler (>= 1.15.0)
railties (= 7.0.8)
rails-dom-testing (2.2.0)
activesupport (>= 5.0.0)
minitest
nokogiri (>= 1.6)
rails-html-sanitizer (1.6.0)
loofah (~> 2.21)
nokogiri (~> 1.14)
railties (7.0.8)
actionpack (= 7.0.8)
activesupport (= 7.0.8)
method_source
rake (>= 12.2)
thor (~> 1.0)
zeitwerk (~> 2.5)
rainbow (3.1.1)
rake (13.1.0)
regexp_parser (2.8.2)
rexml (3.2.6)
rspec-core (3.12.2)
rspec-support (~> 3.12.0)
rspec-expectations (3.12.3)
diff-lcs (>= 1.2.0, < 2.0)
rspec-support (~> 3.12.0)
rspec-mocks (3.12.6)
diff-lcs (>= 1.2.0, < 2.0)
rspec-support (~> 3.12.0)
rspec-rails (6.0.3)
actionpack (>= 6.1)
activesupport (>= 6.1)
railties (>= 6.1)
rspec-core (~> 3.12)
rspec-expectations (~> 3.12)
rspec-mocks (~> 3.12)
rspec-support (~> 3.12)
rspec-support (3.12.1)
rspec_junit_formatter (0.6.0)
rspec-core (>= 2, < 4, != 2.12.0)
rubocop (1.57.2)
json (~> 2.3)
language_server-protocol (>= 3.17.0)
parallel (~> 1.10)
parser (>= 3.2.2.4)
rainbow (>= 2.2.2, < 4.0)
regexp_parser (>= 1.8, < 3.0)
rexml (>= 3.2.5, < 4.0)
rubocop-ast (>= 1.28.1, < 2.0)
ruby-progressbar (~> 1.7)
unicode-display_width (>= 2.4.0, < 3.0)
rubocop-ast (1.30.0)
parser (>= 3.2.1.0)
rubocop-capybara (2.19.0)
rubocop (~> 1.41)
rubocop-factory_bot (2.24.0)
rubocop (~> 1.33)
rubocop-packaging (0.5.2)
rubocop (>= 1.33, < 2.0)
rubocop-performance (1.19.1)
rubocop (>= 1.7.0, < 2.0)
rubocop-ast (>= 0.4.0)
rubocop-rails (2.22.1)
activesupport (>= 4.2.0)
rack (>= 1.1)
rubocop (>= 1.33.0, < 2.0)
rubocop-rspec (2.25.0)
rubocop (~> 1.40)
rubocop-capybara (~> 2.17)
rubocop-factory_bot (~> 2.22)
ruby-progressbar (1.13.0)
ruby_parser (3.20.3)
sexp_processor (~> 4.16)
rubyzip (2.3.2)
selenium-webdriver (4.15.0)
rexml (~> 3.2, >= 3.2.5)
rubyzip (>= 1.2.2, < 3.0)
websocket (~> 1.0)
sexp_processor (4.17.0)
simplecov (0.22.0)
docile (~> 1.1)
simplecov-html (~> 0.11)
simplecov_json_formatter (~> 0.1)
simplecov-html (0.12.3)
simplecov-lcov (0.8.0)
simplecov_json_formatter (0.1.4)
thor (1.3.0)
timeout (0.4.0)
tiny_tds (2.1.5)
tzinfo (2.0.6)
concurrent-ruby (~> 1.0)
unicode-display_width (2.5.0)
websocket (1.2.10)
websocket-driver (0.7.6)
websocket-extensions (>= 0.1.0)
websocket-extensions (0.1.5)
xpath (3.2.0)
nokogiri (~> 1.8)
zeitwerk (2.6.12)

PLATFORMS
arm64-darwin-22
x86_64-linux

DEPENDENCIES
active_storage_db!
activerecord-sqlserver-adapter (= 7.0.3.0)
appraisal (~> 2.4)
brakeman
capybara
factory_bot_rails (~> 6.1)
fasterer
pry-rails
rails (~> 7.0.0)
rspec-rails
rspec_junit_formatter
rubocop
rubocop-packaging
rubocop-performance
rubocop-rails
rubocop-rspec
selenium-webdriver
simplecov
simplecov-lcov
tiny_tds

BUNDLED WITH
2.4.19

0 comments on commit d2578d3

Please sign in to comment.