Get Rails System Tests Working with GitHub Actions

Описание к видео Get Rails System Tests Working with GitHub Actions

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.

Комментарии

Информация по комментариям в разработке