Get Rails System Tests Working with GitHub Actions @StatelessCode
Get Rails System Tests Working with GitHub Actions  @StatelessCode
Uploaded September 2022 | Updated November 2026, 2 hours ago
In our previous video, we got our GitHub Actions build working with PostgreSQL. In this video, we ensure that the build works as intended with passing and failing tests.

In order to do this we create a temporary controller and a browser-driven application system test to ensure that the build runs the tests and completes.

As demonstrated in the video, browser-driven tests will only work if you use a headless browser like headless_chrome.

After we are confident that the build works as expected, we remove the temporary code created for the tests and amend our commit from the previous video.

This video covers:
00:00:12 Introduction, review previous video, and overview of the plan for this video
00:02:12 Create a temporary system test so that we can ensure it works on GitHub action
00:11:22 Update RuboCop exclusions
00:14:21 Uncomment sample controller test
00:16:20 Amend commit from previous video and force push to branch
00:17:13 Action hangs and needs to be aborted. Modify ApplicationSystemTestCase to be driven by headless_chrome and make tests fail on purpose
00:20:14 Make tests pass and get successful build
00:21:28 Move the GitHub Action version of database.yml from the previous video into the .github folder
00:25:07 Undo temporary changes that were done to ensure the build would work with tests
00:28:47 Amend commit with final message, force push, merge, and close issue

#ruby #rails7 #rails #rubyonrails #rubygems #codecast #screencast #github #opensource #minitest #TDD #agile #NerdDice #DnD #roleplaying #softwaredevelopment #learntocode #tailwind #postgresql #rubocop #githubactions

This video is CC0 - No rights reserved. (YouTube doesn't allow this option when publishing.) All code is released under the UNLICENSE. Stateless Code denies the concept of "intellectual property". Copying is not stealing.
Get Rails System Tests Working with GitHub ActionsThe Path to Rails 8 - Upgrade Ruby from 3.2 to 3.4 on Rails 7.0Mediocre Karaoke - Time of the Season by The ZombiesThe Path to Rails 8 - Upgrade Tailwind from version 3 to 4 on Rails 7.0Celebrating 200 Stateless Code Videos!Create a RubyGem 95: Consolidate the CHANGELOG to the Master BranchThe Path to Rails 8 - Update bundle and Upgrade Rails from 7.0 to 7.1Joy to the World by Isaac Watts Four Part HarmonyCodecast: Getting Started with Rails 7 02: Setup Git and Create the First ControllerCodecast: statelesscode.com WordPress 01: Hello World, Taxation is Theft!Codecast: statelesscode.com WordPress 10: Add Tagline, Modify Sidebar, Footer Styling and ContentCreate a RubyGem 98: Replace the Expired Gem Certificate
Stateless Code |

Get Rails System Tests Working with GitHub Actions

SHARE TO X SHARE TO REDDIT SHARE TO FACEBOOK WALLPAPER