Integration Testing With Github Actions
About Git Actions
Run your workflows in a virtual machine and local machine as well.
Why Use Git Action
It is easy to build the app in artefacts.
Analyze, build, test and deploy our applications on any platform.
Easily release the app bundle in the Play store.
The speed of GitHub Actions is good.
Reference Links
File Path
Primary Files - https://github.com/egovernments/punjab-mgramseva/blob/develop/frontend/mgramseva/lib/screeens/SelectLanguage/languageSelection.dart
Integrating GitHub Actions In Project
Every command will be written in yml files and all these files will be in .github/workflows/ directory of your repository, then only git will identify our script files.
In our repository we are maintaining this file as main.yml, In this yml file we are executing the android drive job, which will run the integration testing scripts, once all the tests are passed then only it will build the app in QA ENV and store it in the artefacts as shown image.
Explained every line of main.yml file with comments below.
Integrating Self-hosted Runners
About Self-hosted Runner
We can host your own runners and customize the environment used to run jobs in your GitHub Actions workflows. Self-hosted runners can be physical, virtual, in a container, on-premises, or in a cloud.
With self-hosted runners, you can choose to create a custom hardware configuration with more processing power or memory to run larger jobs, install software available on your local network, and choose an operating system not offered by GitHub-hosted runners.
Integrating Self-hosted Runner With Local Machine
On https://github.com/ navigate to the main page of the repository.
In the left sidebar, click Actions.
In the left sidebar, under "Actions", click Runners.
Click New self-hosted runner.
Select the operating system image and architecture of your self-hosted runner machine.
You will see instructions showing you how to download the runner application and install it on your self-hosted runner machine.
After completing the steps to add a self-hosted runner, the runner and its status are now listed under "Runners".
Now you will have to edit the main.yaml file for using our local machine, replace the runs on with
self-hosted
as shown below.
runs-on: ubuntu-latest
>> runs-on: self-hosted
Reference Link
Last updated