Skip to content

Commit

Permalink
FR-613 Fix test suite config
Browse files Browse the repository at this point in the history
we should be able to run the test suite without issues,

Adding a CI workflows to ensure it is working.

Ticket: https://ombulabs.atlassian.net/browse/FR-613
  • Loading branch information
JuanVqz committed Feb 5, 2025
1 parent fd7c7b6 commit 4dbd925
Show file tree
Hide file tree
Showing 4 changed files with 44 additions and 1 deletion.
29 changes: 29 additions & 0 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: Tests

on:
push:
branches: [ '**' ]
pull_request:
branches: [ '**' ]

jobs:
test:
runs-on: ubuntu-latest
strategy:
matrix:
ruby-version: ['2.7', '3.0', '3.1', '3.2']

steps:
- uses: actions/checkout@v3

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

- name: Install dependencies
run: bundle install

- name: Run tests
run: bundle exec rake
9 changes: 9 additions & 0 deletions Rakefile
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,12 @@ load "rails/tasks/engine.rake"
load "rails/tasks/statistics.rake"

require "bundler/gem_tasks"

require 'rake/testtask'

Rake::TestTask.new(:test) do |t|
t.libs << 'test'
t.pattern = 'test/**/*_test.rb'
end

task default: :test
4 changes: 3 additions & 1 deletion test/controllers/callbacks_controller_test.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
require "test_helper"

class CallbacksControllerTest < ActionDispatch::IntegrationTest
GITHUB_INFO = {
"id" => "12345",
Expand Down Expand Up @@ -67,4 +69,4 @@ def organization_members
assert_equal "This application is only available to members of my_org.", flash[:error]
end
end
end
end
3 changes: 3 additions & 0 deletions test/dummy/config/environments/test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,9 @@
# Raises error for missing translations.
# config.i18n.raise_on_missing_translations = true

# Allow any host in the test environment
config.hosts.clear

# Annotate rendered view with file names.
# config.action_view.annotate_rendered_view_with_filenames = true
end

0 comments on commit 4dbd925

Please sign in to comment.