Compile another repo with maven as part of workflow #25945
-
In our company we have the dev project repos, and an automation repo that includes all our automated test suites, which depends on several external tools such as Appium, TestNG, Node and permissions for several internal endpoints. We want to run those tests as the CI for different dev repos. We’ll need to use a self-hosted runner that we’ll install all those dependencies on. Then, we’ll need to run a parameterized maven compile test command that will build and run the automation repo whenever a pull request is made to one of the dev repos. My question is - is that possible to do with GitHub Actions alone? Is it possible to get the “status” of the tests of the automation repo directly from the dev repo workflow right after running it? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
Hi @nadavinvesting 1 Use pull request GitHub event that triggers the dev repo workflow. Such as:
If you have multiple dev repos, you need to set this workflow for each repos. 2 Check out the additional Maven project to a custom working directory by using Checkout V2 action. Such as:
If you want to checkout the different repository that is private you will need to provide your own PAT. 3 Switch to this working directory and run the maven compile test command. Such as:
4 Adding a status badge in the README.md file of your dev repo will show the “status” of the tests of the automation repo directly. The simple example running on hosted runner for reference: https://github.com/NicoNBW/devProject |
Beta Was this translation helpful? Give feedback.
Hi @nadavinvesting
Yes, you can use GitHub Action to achieve this. Detail steps:
1 Use pull request GitHub event that triggers the dev repo workflow. Such as:
If you have multiple dev repos, you need to set this workflow for each repos.
2 Check out the additional Maven project to a custom working directory by using Checkout V2 action. Such as:
If you want to checkout the different repository that is private you will need to provide your own PAT.
3 Switch to this working directory and run the maven compile test command…