diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml
deleted file mode 100644
index be8e3fd99..000000000
--- a/.github/workflows/main.yml
+++ /dev/null
@@ -1,17 +0,0 @@
-name: Deploy
-
-on:
- push:
- branches:
- - main
-
-jobs:
- build:
- runs-on: ubuntu-latest
- steps:
- - uses: actions/checkout@v2
- - uses: akhileshns/heroku-deploy@v3.12.12 # This is the action
- with:
- heroku_api_key: ${{secrets.HEROKU_API_KEY}}
- heroku_app_name: "cfp-next-staging" #Must be unique in Heroku
- heroku_email: "adarsh@cylinder.work"
diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml
new file mode 100644
index 000000000..5811c11be
--- /dev/null
+++ b/.github/workflows/test.yml
@@ -0,0 +1,36 @@
+name: test
+on:
+ push:
+ branches:
+ - "*"
+ pull_request:
+ branches:
+ - "*"
+jobs:
+ rspec:
+ name: rspec
+ runs-on: ubuntu-22.04
+ services:
+ postgres:
+ image: postgres:14.9-bookworm # heroku postgres
+ ports:
+ - 5432:5432
+ env:
+ POSTGRES_USER: postgres
+ POSTGRES_PASSWORD: postgres
+ POSTGRES_DB: cfp_app_test
+ env:
+ RAILS_ENV: test
+ DATABASE_URL: postgres://postgres:postgres@localhost:5432/cfp_app_test
+ steps:
+ - uses: actions/checkout@v4
+ - uses: ruby/setup-ruby@v1
+ with:
+ bundler-cache: true
+ - uses: actions/setup-node@v4
+ with:
+ node-version-file: ".node-version"
+ cache: "yarn"
+ - run: yarn install --frozen-lockfile
+ - run: bundle exec rails db:setup
+ - run: bundle exec rspec
diff --git a/Gemfile b/Gemfile
index 35d5f54a8..39d1c6a38 100644
--- a/Gemfile
+++ b/Gemfile
@@ -103,5 +103,4 @@ group :development, :test do
gem 'selenium-webdriver'
gem 'spring'
gem 'timecop'
- gem 'webdrivers', '~> 4.7'
end
diff --git a/Gemfile.lock b/Gemfile.lock
index 67a21c07b..39865fcde 100644
--- a/Gemfile.lock
+++ b/Gemfile.lock
@@ -127,7 +127,7 @@ GEM
autoprefixer-rails (>= 5.2.1)
sassc (>= 2.0.0)
builder (3.2.4)
- capybara (3.38.0)
+ capybara (3.39.2)
addressable
matrix
mini_mime (>= 0.1.3)
@@ -422,7 +422,7 @@ GEM
responders (3.1.0)
actionpack (>= 5.2)
railties (>= 5.2)
- rexml (3.2.5)
+ rexml (3.2.6)
rspec (3.12.0)
rspec-core (~> 3.12.0)
rspec-expectations (~> 3.12.0)
@@ -462,7 +462,7 @@ GEM
sprockets-rails
tilt
selectize-rails (0.12.6)
- selenium-webdriver (4.8.0)
+ selenium-webdriver (4.12.0)
rexml (~> 3.2, >= 3.2.5)
rubyzip (>= 1.2.2, < 3.0)
websocket (~> 1.0)
@@ -516,10 +516,6 @@ GEM
activemodel (>= 6.0.0)
bindex (>= 0.4.0)
railties (>= 6.0.0)
- webdrivers (4.7.0)
- nokogiri (~> 1.6)
- rubyzip (>= 1.3.0)
- selenium-webdriver (> 3.141, < 5.0)
webpacker (5.4.4)
activesupport (>= 5.2)
rack-proxy (>= 0.6.1)
@@ -617,7 +613,6 @@ DEPENDENCIES
uglifier (>= 1.3.0)
underscore-rails
web-console
- webdrivers (~> 4.7)
webpacker
RUBY VERSION
diff --git a/config/environments/test.rb b/config/environments/test.rb
index 4841b572e..8f56488e1 100644
--- a/config/environments/test.rb
+++ b/config/environments/test.rb
@@ -52,4 +52,5 @@
# Raises error for missing translations.
# config.action_view.raise_on_missing_translations = true
+ config.i18n.default_locale = :en
end
diff --git a/config/locales/en.yml b/config/locales/en.yml
index e8f93251d..1eecaebcc 100644
--- a/config/locales/en.yml
+++ b/config/locales/en.yml
@@ -37,7 +37,7 @@ en:
closes: "CFP closes:"
form: "Proposal Form"
preview: "Preview"
- instruction: Read the %{guidelines} to maximize your chance of approval. Refrain from including any information that would allow a reviewer to identify you.
+ instruction: Read the %{guideline} to maximize your chance of approval. Refrain from including any information that would allow a reviewer to identify you.
guidelines: guidelines
gfm_html: All fields support GitHub Flavored Markdown
form:
diff --git a/spec/features/current_event_user_flow_spec.rb b/spec/features/current_event_user_flow_spec.rb
index 9a79b0000..e3679fdaf 100644
--- a/spec/features/current_event_user_flow_spec.rb
+++ b/spec/features/current_event_user_flow_spec.rb
@@ -58,7 +58,7 @@
expect(current_path).to eq(events_path)
within ".navbar" do
- expect(page).to have_link("CFP App")
+ expect(page).to have_link("Kaigi on Rails CFPApp") # https://github.com/kaigionrails/cfp-app/commit/e745df4da883
expect(page).to_not have_link("My Proposals")
expect(page).to have_link("", href: "/notifications")
expect(page).to have_link(normal_user.name)
@@ -113,7 +113,7 @@
signin(normal_user.email, normal_user.password)
within ".navbar" do
- expect(page).to have_content("CFP App")
+ expect(page).to have_content("Kaigi on Rails CFPApp") # https://github.com/kaigionrails/cfp-app/commit/e745df4da883
expect(page).to have_link("", href: "/notifications")
expect(page).to have_link(normal_user.name)
end
diff --git a/spec/features/receive_speaker_invitation_spec.rb b/spec/features/receive_speaker_invitation_spec.rb
index f71bcd114..5c6093a8f 100644
--- a/spec/features/receive_speaker_invitation_spec.rb
+++ b/spec/features/receive_speaker_invitation_spec.rb
@@ -94,6 +94,7 @@
end
it "can use a twitter oauth account" do
+ skip # https://github.com/kaigionrails/cfp-app/pull/5
click_link "Sign up"
click_link "Sign in with Twitter"
expect(page).to have_content("You have accepted your invitation!")
diff --git a/spec/features/staff/teammate_invitation_spec.rb b/spec/features/staff/teammate_invitation_spec.rb
index 9c7125b18..358474332 100644
--- a/spec/features/staff/teammate_invitation_spec.rb
+++ b/spec/features/staff/teammate_invitation_spec.rb
@@ -64,6 +64,7 @@
end
it "can use a twitter oauth account" do
+ skip # https://github.com/kaigionrails/cfp-app/pull/5
click_link "Sign up"
click_link "Sign in with Twitter"
expect(page).to have_content("Congrats! You are now an official team member of My Event!")