1 00:00:01,260 --> 00:00:03,060 Or get how workflow is looking pretty good. 2 00:00:03,120 --> 00:00:06,150 But right now, it is only running tests inside of our off service. 3 00:00:06,570 --> 00:00:10,410 We definitely need to make sure that we run tests inside of all of our other services as well. 4 00:00:11,010 --> 00:00:15,210 There's two ways that we can implement some additional configuration to run tests inside of our other 5 00:00:15,210 --> 00:00:15,870 services. 6 00:00:16,590 --> 00:00:19,350 First, I got to go back to the code tab on GitHub. 7 00:00:20,720 --> 00:00:26,000 You'll notice inside of here there's a new folder of dot GitHub slash workflows that is all of where 8 00:00:26,000 --> 00:00:28,550 all of our different workflow configuration files get saved. 9 00:00:29,540 --> 00:00:34,180 If we open up the tests, dot Yamal one, that is the workflow, we just created a moment to go. 10 00:00:34,910 --> 00:00:39,110 So there are two different ways that we can make sure that we run tests and Oliver other services. 11 00:00:39,620 --> 00:00:44,450 We can either add in some additional run statements to the thing so we can make sure that we run some 12 00:00:44,450 --> 00:00:49,190 more commands like change into the orders directory, install dependencies and then run tests inside 13 00:00:49,190 --> 00:00:51,860 there and have another line for the ticket service. 14 00:00:51,920 --> 00:00:53,030 Another for expiration. 15 00:00:53,060 --> 00:00:54,380 Another four payments and so on. 16 00:00:54,980 --> 00:00:56,420 That is definitely one way to do it. 17 00:00:56,810 --> 00:00:59,630 But that is going to make sure that we run all of our tests in series. 18 00:00:59,900 --> 00:01:04,250 In other words, we're going to run all the tests for the off service first and then expiration and 19 00:01:04,250 --> 00:01:09,710 then orders and then tickets and so on until it might end up taking several minutes to run all the different 20 00:01:09,710 --> 00:01:10,940 tests for our project. 21 00:01:11,570 --> 00:01:16,460 Well, there's technically another way that we could wire up all of these testing workflows to make 22 00:01:16,460 --> 00:01:17,930 them all run in parallel. 23 00:01:18,680 --> 00:01:23,870 We can create some additional workflows that also execute on the on Polle request event. 24 00:01:24,530 --> 00:01:29,330 And for each of these additional workflows we can create, we'll have them change into each of our other 25 00:01:29,330 --> 00:01:31,730 individual services and run tests inside them. 26 00:01:33,040 --> 00:01:38,000 So essentially, for each individual service, we create a different get hub action and that's going 27 00:01:38,000 --> 00:01:42,610 make sure that they all run in parallel or essentially at the same time, which is going to dramatically 28 00:01:42,700 --> 00:01:44,620 speed up our testing process. 29 00:01:45,870 --> 00:01:45,990 OK. 30 00:01:46,100 --> 00:01:50,240 So that means we're going to go through all of our different services, create a different workflow 31 00:01:50,240 --> 00:01:51,200 file for each of them. 32 00:01:52,260 --> 00:01:57,580 Going to first begin by opening up or directly editing this file on GitHub, I just want to change the 33 00:01:57,580 --> 00:02:02,350 name of the file and the name of the workflow step is to make sure that it's really clear that this 34 00:02:02,350 --> 00:02:03,280 is a set of tests. 35 00:02:03,610 --> 00:02:05,800 We're running the tests in the off service. 36 00:02:06,440 --> 00:02:07,840 So click on the edit this file. 37 00:02:09,720 --> 00:02:14,370 I'm going to change the name right here to s dash off. 38 00:02:15,490 --> 00:02:18,710 I'll change the name of the file as well to test dash off. 39 00:02:22,060 --> 00:02:23,390 I'll then commit these changes. 40 00:02:27,310 --> 00:02:31,640 And then going to copy everything inside of here, and we're going to create a couple of extra files 41 00:02:31,640 --> 00:02:34,310 for all of our other services that actually have tests inside them. 42 00:02:34,640 --> 00:02:39,350 Again, this is to get all these different tests to run in parallel whenever we create a pull request 43 00:02:39,380 --> 00:02:40,520 or merge and changes. 44 00:02:41,440 --> 00:02:44,000 So inside of my workflows directory, I'll click on the workless link. 45 00:02:44,600 --> 00:02:46,340 I'm going to manually create a new file. 46 00:02:47,860 --> 00:02:50,650 I'll give the file a name of tests, dash orders. 47 00:02:51,720 --> 00:02:52,280 Not Yamal. 48 00:02:53,520 --> 00:02:55,390 And I'll paste in all the stuff that we just copied. 49 00:02:56,970 --> 00:02:59,530 All then change tests off to tests orders. 50 00:03:01,230 --> 00:03:02,470 And down inside this run step. 51 00:03:02,560 --> 00:03:06,040 All updated to change into the orders directory instead. 52 00:03:08,780 --> 00:03:11,860 I'll then go down to the bottom and commit those changes. 53 00:03:14,890 --> 00:03:19,690 All right, now, really quick, one thing, one dimension here is we never actually put together any 54 00:03:19,690 --> 00:03:21,670 tests inside of our expiration service. 55 00:03:22,300 --> 00:03:26,950 The only other services we have to create a workflow file for besides off in orders, which we just 56 00:03:26,950 --> 00:03:29,230 graded, is payments and tickets. 57 00:03:29,380 --> 00:03:32,590 So we're going to create two other workflow files, one for tickets and one for payments. 58 00:03:33,070 --> 00:03:34,330 Let's take care of payments first. 59 00:03:35,080 --> 00:03:38,940 So again, inside my reclose directory, I'll create new file of tests. 60 00:03:39,100 --> 00:03:39,670 Desh. 61 00:03:41,510 --> 00:03:42,830 Payments that YAML. 62 00:03:45,820 --> 00:03:46,080 Pace. 63 00:03:46,240 --> 00:03:47,050 All that stuff in. 64 00:03:47,280 --> 00:03:49,960 I'll change the name right there to test dash payments. 65 00:03:51,110 --> 00:03:53,580 And I'll change the C.D. right there as well. 66 00:03:53,620 --> 00:03:54,660 Two payments. 67 00:03:57,060 --> 00:03:57,900 Go down to the bottom. 68 00:04:01,100 --> 00:04:06,320 And then just one more look at another file of tests, dash tickets, dot Yamal. 69 00:04:07,510 --> 00:04:10,930 Do the Paiste tests, Dasch tickets. 70 00:04:12,410 --> 00:04:15,690 And then change city off into seedy tickets. 71 00:04:18,070 --> 00:04:20,880 And then finally go down to the bottom and commit. 72 00:04:22,600 --> 00:04:22,800 OK. 73 00:04:23,060 --> 00:04:23,690 So now he should. 74 00:04:23,720 --> 00:04:28,910 Whenever we create a pull request, which changes to a pillow request, run all for these jobs in parallel, 75 00:04:28,940 --> 00:04:31,040 which would significantly speed up our run. 76 00:04:31,690 --> 00:04:35,780 Before we test this, however, we do need to make sure that we go round to our orders, payments and 77 00:04:35,780 --> 00:04:39,620 tickets, projects and add in that test colon C.I. script to each them. 78 00:04:41,080 --> 00:04:42,240 So back inside, my editor. 79 00:04:43,930 --> 00:04:46,120 Or excuse me, first inside of our terminal. 80 00:04:46,150 --> 00:04:48,610 Let's make sure that we're making these changes to the master branch. 81 00:04:49,370 --> 00:04:51,750 I'm going to change back over to a master first. 82 00:04:53,210 --> 00:04:53,930 Then I'll go back over. 83 00:04:53,970 --> 00:04:56,940 Technically, that didn't matter, we could have just made the changes, why we're on the dev branch 84 00:04:56,940 --> 00:04:57,630 and then check out M.. 85 00:04:57,720 --> 00:04:58,170 But whatever. 86 00:04:58,170 --> 00:05:02,790 I just want to make the point that we want to make these changes to the master branch. 87 00:05:02,910 --> 00:05:08,280 So we're going to go around to our orders, payments and ticket services and add in that new test command. 88 00:05:08,730 --> 00:05:14,100 So first off, inside of Porter's of on the packages on file, we'll add in test S.I. 89 00:05:18,150 --> 00:05:19,800 There's one, I'll save the file and it. 90 00:05:20,700 --> 00:05:21,870 Next up is payments. 91 00:05:24,550 --> 00:05:29,230 Don't put in test, see, I just save it. 92 00:05:30,740 --> 00:05:32,540 And then last one, our ticket service. 93 00:05:40,290 --> 00:05:41,840 Just and save it. 94 00:05:43,560 --> 00:05:44,730 All right, so let's save that. 95 00:05:46,160 --> 00:05:47,480 Well, then go back over to our terminal. 96 00:05:49,240 --> 00:05:52,840 We're going to commit these three change packages on files and then push them up. 97 00:05:53,740 --> 00:05:54,610 We'll do a get add. 98 00:05:56,090 --> 00:05:59,830 I need to make sure I add everything from my route project directory, I cannot add from directly inside 99 00:05:59,840 --> 00:06:00,290 of off. 100 00:06:00,890 --> 00:06:04,580 We'll do a get ad from ticketing now if I do get status. 101 00:06:04,700 --> 00:06:06,470 I should see those three files added. 102 00:06:08,400 --> 00:06:12,480 All commit those changes with the message of added test script. 103 00:06:13,850 --> 00:06:17,600 And then before we try to push these changes, we did just make a change to our master branch. 104 00:06:17,660 --> 00:06:19,280 So we have to pull those changes down first. 105 00:06:20,020 --> 00:06:22,400 I'll do a get pull origin, master. 106 00:06:24,930 --> 00:06:28,740 That's going to merge in those changes once again, you're going to be prompted with an editor. 107 00:06:29,070 --> 00:06:30,480 You can just close the editor out. 108 00:06:31,700 --> 00:06:32,270 Gay marriage. 109 00:06:32,310 --> 00:06:33,060 Those changes in. 110 00:06:33,120 --> 00:06:36,450 And now I can push these up, so get push or Ajin Master. 111 00:06:40,630 --> 00:06:40,870 All right. 112 00:06:40,930 --> 00:06:43,990 Just make sure that we are totally on the same page at this point in time. 113 00:06:44,380 --> 00:06:50,020 We should be able to go back over to get hub, refresh our repository, see all four workflow files 114 00:06:50,020 --> 00:06:54,380 inside the master branch in the DOD, get hub slash workflows file folder. 115 00:06:55,310 --> 00:07:01,210 I should be able to also go back or to my main ticketing directory, go in to, say, the payments service. 116 00:07:01,930 --> 00:07:06,430 Take a look at the packages on file and see the test see script inside there. 117 00:07:06,790 --> 00:07:12,310 And you should build to see that TCI script inside of the orders, payments, tickets, services package 118 00:07:12,310 --> 00:07:13,210 based on files. 119 00:07:14,250 --> 00:07:14,470 All right. 120 00:07:14,520 --> 00:07:15,870 So we've taking a long time here. 121 00:07:15,960 --> 00:07:17,070 So let's now take a pause. 122 00:07:17,370 --> 00:07:17,890 We're going to come back. 123 00:07:17,910 --> 00:07:20,730 Next video, make one more change to our dev branch. 124 00:07:20,970 --> 00:07:25,410 Push it up and then make sure that we run all the tests over our entire project in parallel. 125 00:07:25,980 --> 00:07:27,670 So we'll take you to that in just a moment.