Before we move on to deployment, there is one last thing I want to say about us running our tests right
now whenever we push a change related to any service.
We're going to rerun all of our tests.
So every test inside of every single service.
This might actually be a little bit wasteful if we think about it, because we have built all of our
services to be very independent in nature.
If we ever make a change to, say, our auth service.
That, in theory, should not really break anything inside of payments.
We don't really have any tests that kind of ross across services or for that matter, really any code
either.
You're looking at really ties these different services together is our common module.
And in theory, everything inside the cupboard module is being enforced through the type system, a
touch script, as opposed to any tests.
So if you wanted to, we could technically make sure that if we push some changes related to the service,
we only ran tests related to the odd service.
So in other words, if we change our service, maybe we do not want to run any tests related to payments.
So in this video, going to show you how to set that up to set up some kind of test specific running
or some service specific test is maybe the best way to refer to it.
We can make yet another change to those different config files that we've been putting together.
Now, we can definitely change those config files directly on GitHub by editing them inside the Belton
editor.
But instead, let us pull them down onto our local machine and make a quick change to that, each them
inside of our text editor instead.
First off.
Back at my terminal.
I'm going to change back over to my master branch.
That's a get checkout master.
I'll then pull down the master branch and get all the latest changes.
And after that, I'm going to look back over to my editor.
I'm gonna find the doc, get a file or folder that's been created inside.
There are all of our different workflow files.
Well, then start off inside of tests off the ammo inside of here.
We want to say that we only want to run this job right here.
If a pull request has been issued and that Plourde question contains any changes specifically related
to the off directory.
So to do so, we could put in on Pullo request.
Then after PLUR requests were put in a call in and then pass.
And then a dash and then we'll put in off flash star star like so.
This means if there is ever a pull request upon request, gets reopened or make an update to an existing
Pulo request and the files changed are inside the off directory.
No, specifically any file inside the directory.
If anything inside the directory gets changed, then run this job.
Otherwise, don't run anything at all.
We can now repeat the same process for all of our other workflow files as well.
So I'm going to take that block right there.
Copy it.
I'll go over to our orders, one going to overwrite that block and I'll change the path, two orders.
I'll save the file, go into payments.
Data file.
And then finally on two tickets.
And throw tickets like so.
So let's now save all these files, commit the changes, push them up to our master branch.
Well, then try to make another change to one of our services and then make sure that we only run tests
related to that service.
So back in my criminal.
I'll do it, get status, and I'll see those for changed workflow files.
I'm going to add all that.
I'll push it up.
Versity committed first.
And then push it.
All right.
Let's once again now go back over to our Deb branch will make another change and push it up and take
a look at our pilot request.
I want to check out my Deb branch yet again.
I'm then going to go back over to.
How about our order service, the back inside the order service?
I find the SIRC folder index start to yes.
And on that console log that we added in right there was going to add in another dot to the very end.
That's it.
That's my change.
Just one additional period.
So say the file.
Backwards, my terminal.
There's the change, I'll add it.
Our committed.
And then push off to death.
All right, once we push that off to the death branch on GitHub, we'll go back over to our play request
and take a look at what different tests are now being executed.
Back over here on my request tab.
Upon my request.
It looks like we're running and you'll notice now that we are only running tests related to services
that have been changed inside of this play request.
So every single time we push an update, getups is going to take a look at all the different files that's
been changed for the entire Pullo requests, not just the latest commit in this case.
We have changed files in both the odd service and the order service.
So only test for off and orders are going to be executed.
That just makes sure that we're not running more tests.
We need to run.
Now, of course, maybe you want to run all your tests for every PLUR requests.
That is totally fine if that is the case.
We could just go back over to that workflow file, which I can't see very easily right now because I'm
on my dev branch.
We can just go backwards those workflow files and remove those half files or the path settings that
we just added in.
Ketso looks like all tests are good to go, and we did not have to run any tests around our other two
services of payments and tickets.
Good little improvement.
We're definitely going to use this improvement once we start tackling deployment as well.