Skip to content

Add spike Github Actions workflow #1

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

Open
wants to merge 7 commits into
base: master
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.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
49 changes: 0 additions & 49 deletions .circleci/config.yml

This file was deleted.

72 changes: 72 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
name: CI

on:
push:
branches:
- main
pull_request:

jobs:
build:
name: Ruby ${{ matrix.ruby }}, Rails ${{ matrix.rails }}
continue-on-error: ${{ matrix.continue-on-error }}

strategy:
fail-fast: false
matrix:
ruby: ["3.4", "3.3", "3.2"]
rails: ["8.0", "7.2", "7.1", "7.0"]
continue-on-error: [false]
include:
- ruby: "3.4"
rails: "main"
continue-on-error: true
- ruby: "head"
rails: "main"
continue-on-error: true

runs-on: ubuntu-latest

services:
mssql:
image: mcr.microsoft.com/mssql/server:2022-latest
env:
SA_PASSWORD: yourStrongPassword123
ACCEPT_EULA: Y
ports:
- 1433:1433

env:
RAILS_VERSION: ${{ matrix.rails }}
MSSQL_USER: "sa"
MSSQL_PASSWORD: "yourStrongPassword123"

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

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

- name: Install dependent libraries
run: sudo apt install freetds-dev freetds-bin

- run: echo "CREATE DATABASE scenic_test" | tsql -H localhost -p 1433 -U sa -P yourStrongPassword123

- name: Generate lockfile
run: bundle lock

- name: Cache dependencies
uses: actions/cache@v4
with:
path: vendor/bundle
key: bundle-${{ hashFiles('Gemfile.lock') }}

- name: Set up Scenic
run: bin/setup

- name: Run tests
run: bundle exec rake test
continue-on-error: ${{ matrix.continue-on-error }}
3 changes: 0 additions & 3 deletions .rspec

This file was deleted.

5 changes: 0 additions & 5 deletions .travis.yml

This file was deleted.

205 changes: 127 additions & 78 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2,99 +2,148 @@ PATH
remote: .
specs:
scenic_sqlserver_adapter (0.1.1)
activerecord (>= 4.0, < 6)
scenic (~> 1.4)
scenic (~> 1.8)

GEM
remote: https://rubygems.org/
specs:
actionpack (5.2.3)
actionview (= 5.2.3)
activesupport (= 5.2.3)
rack (~> 2.0)
actionpack (8.0.1)
actionview (= 8.0.1)
activesupport (= 8.0.1)
nokogiri (>= 1.8.5)
rack (>= 2.2.4)
rack-session (>= 1.0.1)
rack-test (>= 0.6.3)
rails-dom-testing (~> 2.0)
rails-html-sanitizer (~> 1.0, >= 1.0.2)
actionview (5.2.3)
activesupport (= 5.2.3)
rails-dom-testing (~> 2.2)
rails-html-sanitizer (~> 1.6)
useragent (~> 0.16)
actionview (8.0.1)
activesupport (= 8.0.1)
builder (~> 3.1)
erubi (~> 1.4)
rails-dom-testing (~> 2.0)
rails-html-sanitizer (~> 1.0, >= 1.0.3)
activemodel (5.2.3)
activesupport (= 5.2.3)
activerecord (5.2.3)
activemodel (= 5.2.3)
activesupport (= 5.2.3)
arel (>= 9.0)
activesupport (5.2.3)
concurrent-ruby (~> 1.0, >= 1.0.2)
i18n (>= 0.7, < 2)
minitest (~> 5.1)
tzinfo (~> 1.1)
arel (9.0.0)
builder (3.2.3)
concurrent-ruby (1.1.5)
crass (1.0.4)
diff-lcs (1.3)
erubi (1.8.0)
i18n (1.6.0)
erubi (~> 1.11)
rails-dom-testing (~> 2.2)
rails-html-sanitizer (~> 1.6)
activemodel (8.0.1)
activesupport (= 8.0.1)
activerecord (8.0.1)
activemodel (= 8.0.1)
activesupport (= 8.0.1)
timeout (>= 0.4.0)
activerecord-sqlserver-adapter (8.0.2)
activerecord (~> 8.0.0)
tiny_tds
activesupport (8.0.1)
base64
benchmark (>= 0.3)
bigdecimal
concurrent-ruby (~> 1.0, >= 1.3.1)
connection_pool (>= 2.2.5)
drb
i18n (>= 1.6, < 2)
logger (>= 1.4.2)
minitest (>= 5.1)
securerandom (>= 0.3)
tzinfo (~> 2.0, >= 2.0.5)
uri (>= 0.13.1)
base64 (0.2.0)
benchmark (0.4.0)
bigdecimal (3.1.9)
builder (3.3.0)
concurrent-ruby (1.3.4)
connection_pool (2.5.0)
crass (1.0.6)
date (3.4.1)
drb (2.2.1)
erubi (1.13.1)
i18n (1.14.6)
concurrent-ruby (~> 1.0)
loofah (2.2.3)
io-console (0.8.0)
irb (1.14.3)
rdoc (>= 4.0.0)
reline (>= 0.4.2)
logger (1.6.5)
loofah (2.24.0)
crass (~> 1.0.2)
nokogiri (>= 1.5.9)
method_source (0.9.2)
mini_portile2 (2.4.0)
minitest (5.11.3)
nokogiri (1.10.4)
mini_portile2 (~> 2.4.0)
rack (2.0.7)
rack-test (1.1.0)
rack (>= 1.0, < 3)
rails-dom-testing (2.0.3)
activesupport (>= 4.2.0)
nokogiri (>= 1.12.0)
minitest (5.25.4)
nokogiri (1.18.1-aarch64-linux-gnu)
racc (~> 1.4)
nokogiri (1.18.1-aarch64-linux-musl)
racc (~> 1.4)
nokogiri (1.18.1-arm-linux-gnu)
racc (~> 1.4)
nokogiri (1.18.1-arm-linux-musl)
racc (~> 1.4)
nokogiri (1.18.1-arm64-darwin)
racc (~> 1.4)
nokogiri (1.18.1-x86_64-darwin)
racc (~> 1.4)
nokogiri (1.18.1-x86_64-linux-gnu)
racc (~> 1.4)
nokogiri (1.18.1-x86_64-linux-musl)
racc (~> 1.4)
psych (5.2.2)
date
stringio
racc (1.8.1)
rack (2.2.10)
rack-session (1.0.2)
rack (< 3)
rack-test (2.2.0)
rack (>= 1.3)
rackup (1.0.1)
rack (< 3)
webrick
rails-dom-testing (2.2.0)
activesupport (>= 5.0.0)
minitest
nokogiri (>= 1.6)
rails-html-sanitizer (1.2.0)
loofah (~> 2.2, >= 2.2.2)
railties (5.2.3)
actionpack (= 5.2.3)
activesupport (= 5.2.3)
method_source
rake (>= 0.8.7)
thor (>= 0.19.0, < 2.0)
rake (10.5.0)
rspec (3.7.0)
rspec-core (~> 3.7.0)
rspec-expectations (~> 3.7.0)
rspec-mocks (~> 3.7.0)
rspec-core (3.7.0)
rspec-support (~> 3.7.0)
rspec-expectations (3.7.0)
diff-lcs (>= 1.2.0, < 2.0)
rspec-support (~> 3.7.0)
rspec-mocks (3.7.0)
diff-lcs (>= 1.2.0, < 2.0)
rspec-support (~> 3.7.0)
rspec-support (3.7.0)
rspec_junit_formatter (0.4.1)
rspec-core (>= 2, < 4, != 2.12.0)
scenic (1.5.1)
rails-html-sanitizer (1.6.2)
loofah (~> 2.21)
nokogiri (>= 1.15.7, != 1.16.7, != 1.16.6, != 1.16.5, != 1.16.4, != 1.16.3, != 1.16.2, != 1.16.1, != 1.16.0.rc1, != 1.16.0)
railties (8.0.1)
actionpack (= 8.0.1)
activesupport (= 8.0.1)
irb (~> 1.13)
rackup (>= 1.0.0)
rake (>= 12.2)
thor (~> 1.0, >= 1.2.2)
zeitwerk (~> 2.6)
rake (13.2.1)
rdoc (6.10.0)
psych (>= 4.0.0)
reline (0.6.0)
io-console (~> 0.5)
scenic (1.8.0)
activerecord (>= 4.0.0)
railties (>= 4.0.0)
thor (0.20.3)
thread_safe (0.3.6)
tzinfo (1.2.5)
thread_safe (~> 0.1)
securerandom (0.4.1)
stringio (3.1.2)
thor (1.3.2)
timeout (0.4.3)
tiny_tds (3.1.0)
bigdecimal (~> 3)
tzinfo (2.0.6)
concurrent-ruby (~> 1.0)
uri (1.0.2)
useragent (0.16.11)
webrick (1.9.1)
zeitwerk (2.7.1)

PLATFORMS
ruby
aarch64-linux-gnu
aarch64-linux-musl
arm-linux-gnu
arm-linux-musl
arm64-darwin
x86_64-darwin
x86_64-linux-gnu
x86_64-linux-musl

DEPENDENCIES
bundler (~> 1.16)
rake (~> 10.0)
rspec (~> 3.0)
rspec_junit_formatter
activerecord-sqlserver-adapter
rake
scenic_sqlserver_adapter!

BUNDLED WITH
1.17.1
2.6.2
6 changes: 2 additions & 4 deletions Rakefile
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
require "bundler/gem_tasks"
require "rspec/core/rake_task"
require "minitest/test_task"

RSpec::Core::RakeTask.new(:spec)

task :default => :spec
Minitest::TestTask.create
27 changes: 27 additions & 0 deletions bin/rake
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
#!/usr/bin/env ruby
# frozen_string_literal: true

#
# This file was generated by Bundler.
#
# The application 'rake' is installed as part of a gem, and
# this file is here to facilitate running it.
#

ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../Gemfile", __dir__)

bundle_binstub = File.expand_path("bundle", __dir__)

if File.file?(bundle_binstub)
if File.read(bundle_binstub, 300).include?("This file was generated by Bundler")
load(bundle_binstub)
else
abort("Your `bin/bundle` was not generated by Bundler, so this binstub cannot run.
Replace `bin/bundle` by running `bundle binstubs bundler --force`, then run this command again.")
end
end

require "rubygems"
require "bundler/setup"

load Gem.bin_path("rake", "rake")
Loading