Skip to content

Commit

Permalink
Merge pull request #12 from unasuke/github-actions
Browse files Browse the repository at this point in the history
Run specs on GitHub Actions
  • Loading branch information
unasuke authored Feb 21, 2024
2 parents cce33e6 + a4d0a9e commit f6ec3fc
Show file tree
Hide file tree
Showing 9 changed files with 45 additions and 29 deletions.
17 changes: 0 additions & 17 deletions .github/workflows/main.yml

This file was deleted.

36 changes: 36 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -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
1 change: 0 additions & 1 deletion Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -103,5 +103,4 @@ group :development, :test do
gem 'selenium-webdriver'
gem 'spring'
gem 'timecop'
gem 'webdrivers', '~> 4.7'
end
11 changes: 3 additions & 8 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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)
Expand Down Expand Up @@ -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)
Expand Down Expand Up @@ -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)
Expand Down Expand Up @@ -617,7 +613,6 @@ DEPENDENCIES
uglifier (>= 1.3.0)
underscore-rails
web-console
webdrivers (~> 4.7)
webpacker

RUBY VERSION
Expand Down
1 change: 1 addition & 0 deletions config/environments/test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -52,4 +52,5 @@

# Raises error for missing translations.
# config.action_view.raise_on_missing_translations = true
config.i18n.default_locale = :en
end
2 changes: 1 addition & 1 deletion config/locales/en.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ en:
closes: "CFP closes:"
form: "Proposal Form"
preview: "Preview"
instruction: Read the <strong>%{guidelines}</strong> to maximize your chance of approval. Refrain from including any information that would allow a reviewer to identify you.
instruction: Read the <strong>%{guideline}</strong> 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 <a href="https://help.github.com/articles/github-flavored-markdown"><strong>GitHub Flavored Markdown</strong></a>
form:
Expand Down
4 changes: 2 additions & 2 deletions spec/features/current_event_user_flow_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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
Expand Down
1 change: 1 addition & 0 deletions spec/features/receive_speaker_invitation_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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!")
Expand Down
1 change: 1 addition & 0 deletions spec/features/staff/teammate_invitation_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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!")
Expand Down

0 comments on commit f6ec3fc

Please sign in to comment.