From the course: Test-Driven Development in an AI World
Unlock this course with a free trial
Join today to access over 24,900 courses taught by industry experts.
Setting up GitHub Actions for automated testing
From the course: Test-Driven Development in an AI World
Setting up GitHub Actions for automated testing
- [Instructor] In this lesson, you're going to set up a GitHub Actions workflow that runs your test every time someone opens Apple request. To make it work, first, run your test opening the terminal, and typing "npm run test". Confirm everything passes. And next, commit your local changes with the comment "git add." to stage any change. Commit the changes with the comment "git commit -m" and a message, like "new feature," hit Enter. And finally, send the changes to GitHub with the comment "git push origin", and the name of the current branch, in this case "new-feature". Now that your code, it's in GitHub, let's go there and select the Actions tab. Select the "set up a workflow yourself" option. And this creates a new file under .github/workflows. I'm calling this file "tdd-workflow.yml", and give it name like "TDD workflow". Now define the 'on' section. This tells GitHub when to trigger your action. Set it to listen for pull requests. And define an array of branches. I'm using here…