Skip to content

Commit

Permalink
Add GitHub Actions for CI
Browse files Browse the repository at this point in the history
Additionally fix an issue where the delegation module was not required
  • Loading branch information
Fryguy committed Mar 26, 2024
1 parent 7342026 commit 40471e7
Show file tree
Hide file tree
Showing 6 changed files with 49 additions and 2 deletions.
38 changes: 38 additions & 0 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
name: CI

on:
push:
pull_request:
schedule:
- cron: '0 0 * * 0'
workflow_dispatch:

jobs:
ci:
runs-on: ubuntu-latest
strategy:
matrix:
ruby-version:
- '2.5'
- '2.6'
- '2.7'
- '3.0'
- '3.1'
rails-version:
- '5.2'
- '6.0'
- '6.1'
- '7.0'
env:
TEST_RAILS_VERSION: ${{ matrix.rails-version }}
CC_TEST_REPORTER_ID: ${{ secrets.CC_TEST_REPORTER_ID }}
steps:
- uses: actions/checkout@v4
- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby-version }}
bundler-cache: true
timeout-minutes: 30
- name: Run tests
run: bundle exec rake
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -56,3 +56,4 @@ build-iPhoneSimulator/
# .rubocop-https?--*

Gemfile.lock
.rspec_status
1 change: 1 addition & 0 deletions .rspec
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
--require spec_helper
6 changes: 4 additions & 2 deletions Gemfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
source "https://rubygems.org"

git_source(:github) {|repo_name| "https://github.com/#{repo_name}" }

# Specify your gem's dependencies in servicenow-ruby.gemspec
gemspec

if ENV["TEST_RAILS_VERSION"]
gem "activesupport", "~> #{ENV["TEST_RAILS_VERSION"]}.0"
end
1 change: 1 addition & 0 deletions lib/servicenow.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

require "active_support"
require "active_support/core_ext/hash"
require "active_support/core_ext/module/delegation"

module ServiceNow
require "servicenow/api"
Expand Down
4 changes: 4 additions & 0 deletions spec/spec_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,7 @@
c.syntax = :expect
end
end

require "active_support"
puts
puts "\e[93mUsing ActiveSupport #{ActiveSupport.version}\e[0m"

0 comments on commit 40471e7

Please sign in to comment.