DIGIT mGramSeva
PlatformDomainsAcademyDesign SystemFeedback
v1.2
v1.2
  • Introducing mGramSeva
    • Platform
      • Release Notes
        • Web Caching
        • Service Build Updates
        • MDMS Configuration & Migration Updates
        • Test Cases
        • Release Checklist
        • Implementation Checklist
      • Technology
      • Architecture
      • Demo video
      • Configure mGramSeva
        • Vendor Registry Service
        • User Events Service
        • eChallans Service
        • Water Calculator Service
        • Property Services
        • Billing Service
        • Apportion Service
      • Technical User Docs
        • Application Structure
        • Firebase Analytics Integration
        • Integration Testing
        • Integration Testing With Github Actions
        • Backend Services
          • mGramSeva - Water Services
          • mGramSeva - Water Service Calculator
          • mGramSeva e-Challan Service
          • mGramSeva - User Service
          • mGramSeva - Billing Service
          • mGramSeva - User OTP
          • iFix Adapter Integration Service
          • mGramSeva - Rollout Dashboard
          • mGramSeva Scheduler
          • mGramSeva- Services Re-Indexing
          • mGramSeva Dashboard
          • Events Push To IFIX Adapter
        • Tech User Manual
          • Language Selection
          • Login
          • Change Password
          • Edit Profile
          • Home Page
          • Forgot Password
          • Update Password FTL
          • Generate Bill
          • Search Connection
          • Consumer Details
            • Create Consumer
            • Update Consumer
          • Expenses
            • Add Expenses
            • Search Expense Bills
            • Modify Expenses
          • Dashboards
            • Monthly Dashboard
            • Collections Dashboard
            • Expenditure Dashboard
          • Collect Payment
          • Consumer Feedback
          • Household Register
          • Bluetooth Thermal Printer Integration
        • Application Permissions & Dependencies
        • mGramSeva UI
          • UI Mockups
          • mGramSeva UI
            • mGramSeva - Advance Changes
            • mGramSeva Penalty Changes
      • Installation
      • Configuration
    • Enablement toolkits
      • AWS Installation
        • Setup AWS Account
        • Certificate Purchase
        • Setup Git Repository
        • Domain Name Configuration
        • Create Git Account In The Client Name
      • Setting up Services
        • Getting Started With DIGIT
        • Creating Users
        • Loading Employees For mGramSeva
        • Loading Consumers For mGramSeva
        • Localisation Module
        • Updating Master Rate for Mgramseva
        • Create Consumer API
        • Create User API
        • SMS Template
        • mGramSeva MDMS
        • Create New Tenant
        • Workflow
    • Product Docs
      • Functional Docs
        • Login & Forgot Password
        • User Roles & Home Screen
        • Create Consumer
        • Search Consumer
        • Edit Consumer
        • View Consumer
        • Billing - Bulk Demand Generation
        • Billing - Metered Connection
        • Revenue Collection - Offline
        • Expenditure - Add Expense
        • Expenditure - Modify Expense
        • User Onboarding - Bulk Upload
        • User Onboarding/Walkthrough
        • Feedback - Post Payment
        • SMS Notifications
        • Home Page Notifications
        • Edit User Profile
        • Bill and Receipt PDF
        • Update Expense Search
        • Bulk Demand Generation For Non-Metered Connection
        • Demand/Bill Generation For Metered Connection
        • Household Register
        • Tabular Dashboard - Expense
        • Tabular Dashboard - Collection
        • Download Bills & Receipt
        • App Force Update
        • HRMS
        • Advance Changes
      • User Docs
        • User Manual
  • 🚻Community
    • Roadmap
    • Source Code
    • Discussion
    • Events
    • Training & Certification
Powered by GitBook

All content on this page by eGov Foundation is licensed under a Creative Commons Attribution 4.0 International License.

On this page
  • About Git Actions
  • Why Use Git Action
  • Reference Links
  • File Path
  • Integrating GitHub Actions In Project
  • Integrating Self-hosted Runners
  • About Self-hosted Runner
  • Integrating Self-hosted Runner With Local Machine
  • Reference Link
  1. Introducing mGramSeva
  2. Platform
  3. Technical User Docs

Integration Testing With Github Actions

PreviousIntegration TestingNextBackend Services

Last updated 2 years ago

About Git Actions

GitHub Actions enables you to create custom software development lifecycle workflows directly in your GitHub repository. This enables you to include Continuous Integration (CI) and continuous deployment (CD) capabilities. It makes it easier to automate how you build, test, and deploy your projects on any platform, including Linux, macOS, and Windows.

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

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.


# 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. 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

  • 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

Primary Files -

On navigate to the main page of the repository.

Under your repository name, click Settings as shown in the image.

All content on this page by is licensed under a .

https://github.com/egovernments/punjab-mgramseva/blob/develop/frontend/mgramseva/lib/screeens/SelectLanguage/languageSelection.dart
https://github.com/
​
eGov Foundation
Creative Commons Attribution 4.0 International License
Creative Commons License
GitHub Actions Documentation - GitHub DocsGitHub Docs
Github Actions for FlutterMedium
About self-hosted runners - GitHub DocsGitHub Docs
Adding self-hosted runners - GitHub DocsGitHub Docs
Logo
Logo
Logo
Logo