...
Code Block |
---|
# Name of your workflow. name: integration-test # Trigger the workflow on push or pull requests. on: push: branches: [ IFIX-732 ] # A workflow run is made up of one or more jobs. jobs: # id of job, a string that is unique to the "jobs" node above. drive_android: # The type of machine to run the job on. runs-on: ubuntu-latest # Creates a build matrix for your jobs. You can define different # variations of an environment to run each job in. strategy: # A set of different configurations of the virtual # environment. matrix: api-level: [ 30 ] target: [ default ] # Contains a sequence of tasks. steps: # The branch or tag ref that triggered the workflow will be # checked out. - uses: actions/checkout@v2 # Sets up a java environment. - uses: actions/setup-java@v1 with: java-version: '1.8.x' # Sets up a Flutter environment. - uses: subosito/flutter-action@v1 with: flutter-version: '2.5.2' channel: 'stable' - name: "Run Flutter Driver tests" #Operation for installing, configuring and running Android emulator # https://github.com/marketplace/actions/android-emulator-runner uses: reactivecircus/android-emulator-runner@v2 with: api-level: ${{ matrix.api-level }} target: ${{ matrix.target }} arch: x86_64 profile: Nexus 6 script: "cd ./frontend/mgramseva && flutter drive --dart-define=BASE_PATH=https://mgramseva-qa.egov.org.in/ --driver=test_driver/integration_test_driver.dart --target=integration_test/login_test.dart" # checking out to respective directory and building the apk - name: "flutter pub get" run: cd ./frontend/mgramseva && flutter build apk # uploading the release build to artifact - uses: actions/upload-artifact@v1 with: name: release-apk path: frontend/mgramseva/build/app/outputs/apk/release/app-release.apk |
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.
...
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 GitHub.com, navigate to the main page of the repository.
Under your repository name, click Settings as show in image.
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
https://docs.github.com/en/actions/hosting-your-own-runners/adding-self-hosted-runners
...