1 00:00:01,200 --> 00:00:03,380 In the last video, we created our first GitHub hook. 2 00:00:03,720 --> 00:00:05,370 We're not going to try to test this thing out. 3 00:00:05,820 --> 00:00:10,920 So our ultimate goal is to be able to create a pull request and see all the tests for specifically our 4 00:00:10,970 --> 00:00:12,540 art service get executed. 5 00:00:13,110 --> 00:00:17,510 Now, one thing on to point out is that inside this little script we put in NPM run test Kolan S.I. 6 00:00:17,730 --> 00:00:18,240 So why is that? 7 00:00:18,900 --> 00:00:23,430 Well, whenever we run our tests inside of this GitHub environment, we need to make sure that our test 8 00:00:23,430 --> 00:00:25,760 suite exits automatically at some point time. 9 00:00:26,490 --> 00:00:31,620 Right now, our NPM run test command is going to start up just inside the wotcher mode. 10 00:00:32,010 --> 00:00:33,130 So it's going to run continuously. 11 00:00:33,150 --> 00:00:35,520 Just watching for changes to be made to our source code. 12 00:00:36,060 --> 00:00:38,190 We do not want that when we're running our tests on GitHub. 13 00:00:38,220 --> 00:00:44,670 We want just one run of our test suite and we want to exit entirely rather than running NPM test directory 14 00:00:44,730 --> 00:00:45,270 directly. 15 00:00:45,480 --> 00:00:50,370 We're going to instead create a new script called Test in S.I that is going to run our test suite exactly 16 00:00:50,370 --> 00:00:52,530 one time and then automatically exit. 17 00:00:53,170 --> 00:00:56,310 So let's go back over to our OTT service and make that change very quickly. 18 00:00:57,150 --> 00:00:59,880 Inside my service, I'll find the package not just on file. 19 00:01:02,020 --> 00:01:07,880 I'll find the script section inside there and I'm going to add in a new script of Test Colin S.I. 20 00:01:10,120 --> 00:01:11,830 And the command for that, we're going to put in just. 21 00:01:12,460 --> 00:01:14,950 And we actually don't even need that no cash command on there at all. 22 00:01:15,310 --> 00:01:16,200 We definitely do not want. 23 00:01:16,240 --> 00:01:17,440 Watch all as you imagine. 24 00:01:17,440 --> 00:01:19,780 That's what starts up our test suite in the watcher mode. 25 00:01:20,850 --> 00:01:21,750 Well, then save this. 26 00:01:22,500 --> 00:01:24,090 We're going to go over to our terminal. 27 00:01:24,150 --> 00:01:28,110 We're going to commit these changes on the master branch because this is some initial configuration 28 00:01:28,110 --> 00:01:28,710 we're going through. 29 00:01:29,130 --> 00:01:30,420 We're gonna push this up to get hub. 30 00:01:30,720 --> 00:01:34,710 And then after that, we'll make some other small change for our project to kind of simulate making 31 00:01:34,710 --> 00:01:35,110 a change. 32 00:01:35,130 --> 00:01:39,210 This thing in the real world and then push it up to get up and walk through our entire workflow. 33 00:01:40,670 --> 00:01:41,880 So back over at my terminal. 34 00:01:43,230 --> 00:01:43,520 I'll do it. 35 00:01:43,540 --> 00:01:44,100 Get status. 36 00:01:44,130 --> 00:01:45,990 Take a look at the files I've changed. 37 00:01:46,320 --> 00:01:47,760 Just that package stays on file. 38 00:01:48,610 --> 00:01:50,810 It's all adults and uncommitted. 39 00:01:54,060 --> 00:01:54,790 With the message. 40 00:01:55,950 --> 00:01:58,910 And then finally, I'm going to push this up once again to the master branch. 41 00:01:59,240 --> 00:02:01,370 Get push origin master. 42 00:02:03,610 --> 00:02:07,750 And all right, my mistake, we just made a change on GitHub to the master branch. 43 00:02:07,780 --> 00:02:09,640 We have to pull those changes down first. 44 00:02:10,150 --> 00:02:12,740 We need to do a get whole origin, master. 45 00:02:13,270 --> 00:02:13,900 That's better. 46 00:02:16,140 --> 00:02:21,210 You're probably gonna see a little editor pop up asking you to provide a merge message to go through 47 00:02:21,210 --> 00:02:24,900 that process, and once we merge everything, then we can do a get push. 48 00:02:25,470 --> 00:02:26,490 Origin Master. 49 00:02:30,980 --> 00:02:32,270 All right, so there's our changes. 50 00:02:32,460 --> 00:02:35,990 Now, in theory, ah, get hub workflow is all ready to be tested. 51 00:02:36,530 --> 00:02:37,490 Let's pause once more. 52 00:02:37,610 --> 00:02:37,910 Come back. 53 00:02:37,950 --> 00:02:38,480 Next video. 54 00:02:38,570 --> 00:02:42,030 Try making a change and simulate the real workflow that we're going to go through.