Now that we have a unit test for our project, let’s add a GitHub Action to run those unit tests when we commit changes to the repository – and tell you if those changes broke any unit tests. Ideally, we would always run our unit tests before pushing a change to the repository, but we’re all human and sometimes we forget. By creating a GitHub Action, we’ll be sure the tests are always run. Creating the GitHub Action Go to your project’s page on GitHub and click the “Actions” link. The instructions for the action are listed in a YML…
Leave a CommentCategory: Free Guides
What is a unit test? A unit test is a small function that calls a function from our “real” program and verifies the results from the function are the expected results. For example, if we have a function that calculates the sum of two integers, and we pass it a 2 and a 4, we’d expect to get a 6 back from it. Our unit test function would call the “add two numbers” function, passing in a 2 and a 4, and confirm the function returns a 6. Why do I need unit tests? This is a small, simple function.…
Leave a CommentHere’s a video on how to connect Visual Studio Community Edition 2022 to your GitHub account, so you can save a project to GitHub, push your code changes to GitHub, share your GitHub project with another GitHub user, and download someone else’s project from GitHub. Transcript In this video, I’ll demonstrate connecting Visual Studio Community Edition 2022 to GitHub. I’m only going to cover a couple of the very basic things you can do with GitHub. I’m not going to cover some of the things that you would get into if you were working on a team or using GitHub for…
Leave a CommentHere’s a quick video on how to install Visual Studio Community Edition 2022. Transcript In this video I’m going to show how to install Visual Studio Community Edition 2022. The first step is to open your favorite browser, go to your favorite search engine, and search for “Visual Studio Community Edition 2022”. Download the Visual Studio Community Edition Installer Look for the visualstudio.microsoft.com link and click on that. You should see a download Visual Studio button. Click on that button. Save the setup file to disk and then run it. This program gets the latest version of the Visual Studio installer. When…
Leave a Comment