@StatelessCode
  @StatelessCode
Stateless Code | Set up GitHub Actions with Rails 7 and Get Working with PostgreSQL @StatelessCode | Uploaded September 2022 | Updated October 2024, 4 hours ago.
Before we start doing real development for our Rails 7 app, we want to establish the foundation of having an automated build on GitHub so that we can run a set of checks on the health of a pushed branch before merging it. This helps enhance the maintainability of our app by identifying or preventing technichal debt from being accidentally introduced into the app. This could become even more important in the future if we have other collaborators who want to contribute to the project.

We use the existing GitHub action from our NerdDice RubyGem as a starting point and then adapt it for use with Rails, PostgreSQL, and MiniTest. Getting the GitHub action working with PostgreSQL is the particular challenge and interest tackled in this video. We will deal with ensuring the browser-driven system tests work in the next video.

This video covers:
00:00:12 Introduction, recap of previous videos, and overview of how GitHub Actions were set up on the NerdDice RubyGem
00:02:51 Differences between the RubyGem and Rails projects (system tests and database setup)
00:04:32 Copy and adapt GitHub Actions file from NerdDice RubyGem
00:13:36 Initial push for GitHub Action, fix incorrect reference
00:15:55 Various unsuccessful iterations to get GitHub Action working with PostgreSQL
00:29:05 Get working solution of GitHub Action specific database.yml thanks to Jetse Koopmans from pibit
00:33:50 Run and commit migration to generate schema.rb and make build green
00:38:46 Try to get the database already exists warning cleared, but revert to previous state for the time being

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

See other related StatelessCode videos:
- NerdDice RubyGem: Goodbye, Travis! Hello GitHub Actions! youtu.be/XXCbkX-tBTQ

Resources that we relied upon for this solution:
- GitHub Actions with Rails, Postgres and RSpec by Jetse Koopmans https://www.pibit.nl/github/actions/rails/postgres/rspec/tutorial/example/2019/09/23/github-actions-with-rails-postgres-and-rspec/
- Rails System Tests with GitHub Actions by Eric Saupe https://eric.sau.pe/rails-system-tests-with-github-actions

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.
Set up GitHub Actions with Rails 7 and Get Working with PostgreSQLCodecast: statelesscode.com WordPress 17: Start Styling the SidebarInkscape 08: Create Transparent Logo for Why SeriesCodecast: statelesscode.com WordPress 20: Fix Sidebar Overflow and Horizontal ScrollingNerdDice.com Retrospective 2 - User Authentication with DeviseInkscape 01: Install Inkscape on UbuntuCreate a RubyGem 102: Winter 2024 Maintenance Part 1 - Update Bundle and Fix Rubocop ViolationsCreate a RubyGem 103: Winter 2024 Maintenance Part 2 - Update Certs and Release Version 0.5.1Codecast: Getting Started with Rails 7 25: Set Up a Comments MailerGenerate a New Rails 7 Project With Tailwind and PostgreSQLMake Devise ParanoidCodecast: Create a RubyGem 60: Add Ability Scores Documentation and Merge

Set up GitHub Actions with Rails 7 and Get Working with PostgreSQL @StatelessCode

SHARE TO X SHARE TO REDDIT SHARE TO FACEBOOK WALLPAPER