1 00:00:01,490 --> 00:00:05,870 Before we move on to deployment, there is one last thing I want to say about us running our tests right 2 00:00:05,870 --> 00:00:08,390 now whenever we push a change related to any service. 3 00:00:08,450 --> 00:00:10,940 We're going to rerun all of our tests. 4 00:00:11,030 --> 00:00:13,400 So every test inside of every single service. 5 00:00:14,090 --> 00:00:18,260 This might actually be a little bit wasteful if we think about it, because we have built all of our 6 00:00:18,260 --> 00:00:20,420 services to be very independent in nature. 7 00:00:20,840 --> 00:00:23,240 If we ever make a change to, say, our auth service. 8 00:00:23,630 --> 00:00:27,110 That, in theory, should not really break anything inside of payments. 9 00:00:28,320 --> 00:00:33,000 We don't really have any tests that kind of ross across services or for that matter, really any code 10 00:00:33,030 --> 00:00:33,410 either. 11 00:00:34,020 --> 00:00:37,290 You're looking at really ties these different services together is our common module. 12 00:00:37,590 --> 00:00:41,820 And in theory, everything inside the cupboard module is being enforced through the type system, a 13 00:00:41,820 --> 00:00:43,740 touch script, as opposed to any tests. 14 00:00:44,810 --> 00:00:50,120 So if you wanted to, we could technically make sure that if we push some changes related to the service, 15 00:00:50,330 --> 00:00:53,600 we only ran tests related to the odd service. 16 00:00:54,110 --> 00:00:59,150 So in other words, if we change our service, maybe we do not want to run any tests related to payments. 17 00:00:59,620 --> 00:01:04,910 So in this video, going to show you how to set that up to set up some kind of test specific running 18 00:01:05,210 --> 00:01:08,240 or some service specific test is maybe the best way to refer to it. 19 00:01:08,690 --> 00:01:12,770 We can make yet another change to those different config files that we've been putting together. 20 00:01:13,730 --> 00:01:18,700 Now, we can definitely change those config files directly on GitHub by editing them inside the Belton 21 00:01:18,700 --> 00:01:19,090 editor. 22 00:01:19,510 --> 00:01:23,540 But instead, let us pull them down onto our local machine and make a quick change to that, each them 23 00:01:23,540 --> 00:01:25,230 inside of our text editor instead. 24 00:01:27,320 --> 00:01:27,870 First off. 25 00:01:27,890 --> 00:01:28,760 Back at my terminal. 26 00:01:28,970 --> 00:01:31,220 I'm going to change back over to my master branch. 27 00:01:31,490 --> 00:01:32,960 That's a get checkout master. 28 00:01:33,580 --> 00:01:36,990 I'll then pull down the master branch and get all the latest changes. 29 00:01:39,220 --> 00:01:41,460 And after that, I'm going to look back over to my editor. 30 00:01:41,910 --> 00:01:45,510 I'm gonna find the doc, get a file or folder that's been created inside. 31 00:01:45,510 --> 00:01:47,460 There are all of our different workflow files. 32 00:01:48,460 --> 00:01:52,570 Well, then start off inside of tests off the ammo inside of here. 33 00:01:52,630 --> 00:01:55,000 We want to say that we only want to run this job right here. 34 00:01:55,600 --> 00:02:01,660 If a pull request has been issued and that Plourde question contains any changes specifically related 35 00:02:01,690 --> 00:02:03,190 to the off directory. 36 00:02:04,190 --> 00:02:07,230 So to do so, we could put in on Pullo request. 37 00:02:07,530 --> 00:02:11,760 Then after PLUR requests were put in a call in and then pass. 38 00:02:13,170 --> 00:02:18,420 And then a dash and then we'll put in off flash star star like so. 39 00:02:20,490 --> 00:02:25,890 This means if there is ever a pull request upon request, gets reopened or make an update to an existing 40 00:02:25,950 --> 00:02:30,600 Pulo request and the files changed are inside the off directory. 41 00:02:30,830 --> 00:02:33,590 No, specifically any file inside the directory. 42 00:02:33,600 --> 00:02:36,810 If anything inside the directory gets changed, then run this job. 43 00:02:37,350 --> 00:02:38,880 Otherwise, don't run anything at all. 44 00:02:39,900 --> 00:02:43,650 We can now repeat the same process for all of our other workflow files as well. 45 00:02:45,090 --> 00:02:47,400 So I'm going to take that block right there. 46 00:02:47,520 --> 00:02:48,140 Copy it. 47 00:02:49,320 --> 00:02:55,120 I'll go over to our orders, one going to overwrite that block and I'll change the path, two orders. 48 00:02:57,500 --> 00:03:00,050 I'll save the file, go into payments. 49 00:03:02,760 --> 00:03:03,470 Data file. 50 00:03:04,200 --> 00:03:05,820 And then finally on two tickets. 51 00:03:08,960 --> 00:03:10,340 And throw tickets like so. 52 00:03:11,790 --> 00:03:16,160 So let's now save all these files, commit the changes, push them up to our master branch. 53 00:03:16,700 --> 00:03:21,020 Well, then try to make another change to one of our services and then make sure that we only run tests 54 00:03:21,020 --> 00:03:22,400 related to that service. 55 00:03:23,840 --> 00:03:24,720 So back in my criminal. 56 00:03:25,930 --> 00:03:28,930 I'll do it, get status, and I'll see those for changed workflow files. 57 00:03:29,820 --> 00:03:30,820 I'm going to add all that. 58 00:03:31,480 --> 00:03:32,200 I'll push it up. 59 00:03:32,220 --> 00:03:33,520 Versity committed first. 60 00:03:36,620 --> 00:03:37,400 And then push it. 61 00:03:43,690 --> 00:03:43,930 All right. 62 00:03:43,960 --> 00:03:48,160 Let's once again now go back over to our Deb branch will make another change and push it up and take 63 00:03:48,160 --> 00:03:49,330 a look at our pilot request. 64 00:03:50,210 --> 00:03:52,420 I want to check out my Deb branch yet again. 65 00:03:54,600 --> 00:03:55,980 I'm then going to go back over to. 66 00:03:56,020 --> 00:03:59,800 How about our order service, the back inside the order service? 67 00:04:00,700 --> 00:04:03,700 I find the SIRC folder index start to yes. 68 00:04:04,090 --> 00:04:08,230 And on that console log that we added in right there was going to add in another dot to the very end. 69 00:04:08,620 --> 00:04:08,950 That's it. 70 00:04:08,980 --> 00:04:09,610 That's my change. 71 00:04:09,640 --> 00:04:10,800 Just one additional period. 72 00:04:11,910 --> 00:04:12,690 So say the file. 73 00:04:14,070 --> 00:04:15,030 Backwards, my terminal. 74 00:04:16,480 --> 00:04:18,430 There's the change, I'll add it. 75 00:04:20,520 --> 00:04:21,810 Our committed. 76 00:04:25,730 --> 00:04:26,750 And then push off to death. 77 00:04:30,260 --> 00:04:34,340 All right, once we push that off to the death branch on GitHub, we'll go back over to our play request 78 00:04:34,370 --> 00:04:36,920 and take a look at what different tests are now being executed. 79 00:04:38,460 --> 00:04:40,560 Back over here on my request tab. 80 00:04:41,750 --> 00:04:42,710 Upon my request. 81 00:04:45,200 --> 00:04:50,080 It looks like we're running and you'll notice now that we are only running tests related to services 82 00:04:50,080 --> 00:04:52,300 that have been changed inside of this play request. 83 00:04:52,880 --> 00:04:57,500 So every single time we push an update, getups is going to take a look at all the different files that's 84 00:04:57,520 --> 00:05:01,780 been changed for the entire Pullo requests, not just the latest commit in this case. 85 00:05:01,780 --> 00:05:04,960 We have changed files in both the odd service and the order service. 86 00:05:05,500 --> 00:05:08,440 So only test for off and orders are going to be executed. 87 00:05:09,070 --> 00:05:10,960 That just makes sure that we're not running more tests. 88 00:05:10,960 --> 00:05:11,620 We need to run. 89 00:05:12,100 --> 00:05:15,370 Now, of course, maybe you want to run all your tests for every PLUR requests. 90 00:05:15,400 --> 00:05:17,620 That is totally fine if that is the case. 91 00:05:17,890 --> 00:05:21,880 We could just go back over to that workflow file, which I can't see very easily right now because I'm 92 00:05:21,880 --> 00:05:22,750 on my dev branch. 93 00:05:23,140 --> 00:05:27,730 We can just go backwards those workflow files and remove those half files or the path settings that 94 00:05:27,730 --> 00:05:28,600 we just added in. 95 00:05:29,980 --> 00:05:35,310 Ketso looks like all tests are good to go, and we did not have to run any tests around our other two 96 00:05:35,310 --> 00:05:38,040 services of payments and tickets. 97 00:05:38,690 --> 00:05:39,750 Good little improvement. 98 00:05:40,060 --> 00:05:43,650 We're definitely going to use this improvement once we start tackling deployment as well.