Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add maintainer, contribution and update readme #1285

Closed
wants to merge 8 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
56 changes: 56 additions & 0 deletions .github/workflows/android-custom-build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
name: Android Custom Build
run-name: ${{ inputs.buildName }}

on:
workflow_dispatch:
inputs:
buildName:
description: 'Run name'
required: true
default: 'Edit this name'
type: string
mimotoBackendServiceUrl:
description: 'Mimoto backend service URL'
required: true
default: 'https://api.sandbox.mosip.net'
type: string
esignetBackendServiceUrl:
description: 'Esignet backend service URL'
required: true
default: 'https://api.sandbox.mosip.net'
type: string
allow_env_edit:
description: 'Edit ENV'
required: true
default: 'true'
type: choice
options:
- false
- true
theme:
description: 'Application Theme'
required: true
default: 'orange'
type: choice
options:
- orange
- purple

jobs:
build-android:
uses: mosip/kattu/.github/workflows/android-build.yml@master
with:
NODE_VERSION: "16.x"
MIMOTO_HOST: ${{ inputs.mimotoBackendServiceUrl }}
ESIGNET_HOST: ${{ inputs.esignetBackendServiceUrl }}
APPLICATION_THEME: ${{ inputs.theme }}
ALLOW_ENV_EDIT: ${{ inputs.allow_env_edit }}
KEYSTORE_ALIAS: androidbuildkey
KEYSTORE_PASSWORD: 'password'
SERVICE_LOCATION: '.'
ANDROID_SERVICE_LOCATION: 'android'
BUILD_SCRIPT_LOCATION: 'scripts'
SCRIPT_NAME: './android-build.sh'
UPLOAD_TO_ACTIONS: 'true'
ANDROID_ARTIFACT_NAME: ${{ inputs.buildName }}
ANDROID_ARTIFACT_PATH: "android/app/build/outputs/apk/residentapp/release/Inji_universal.apk"
6 changes: 3 additions & 3 deletions .github/workflows/push-triggers.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,13 @@ jobs:
uses: mosip/kattu/.github/workflows/android-build.yml@master
with:
NODE_VERSION: "16.x"
DEBUG_KEYSTORE_ALIAS: androiddebugkey
KEYSTORE_ALIAS: androidbuildkey
KEYSTORE_PASSWORD: 'password'
SERVICE_LOCATION: '.'
ANDROID_SERVICE_LOCATION: 'android'
BUILD_SCRIPT_LOCATION: 'scripts'
SCRIPT_NAME: './android-build.sh'
secrets:
DEBUG_KEYSTORE_PASSWORD: '${{ secrets.INJI_ANDROID_DEBUG_STOREPASS }}'
UPLOAD_TO_ACTIONS: 'false'

build-ios:
uses: mosip/kattu/.github/workflows/ios-build.yml@master
Expand Down
190 changes: 190 additions & 0 deletions .github/workflows/ui-automation.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,190 @@
name: UI - Automation
run-name: ${{ inputs.runName }}

on:
workflow_dispatch:
inputs:
runName:
description: 'Run name'
required: true
default: 'Device-pool/Test-name/Env'
type: string
buildFor:
description: 'Build'
required: true
default: 'Both[Android and IOS]'
type: choice
options:
- Both[Android and IOS]
- Android
- IOS
testType:
description: 'Sanity/Regression'
required: true
default: 'sanity'
type: choice
options:
- sanity
- regression
backendServiceUrl:
description: 'Mimoto and Esignet backend service URL'
required: true
default: 'https://api.sandbox.mosip.net'
type: string

jobs:
android-ui-automation:
if: ${{ github.event.inputs.buildFor == 'Both[Android and IOS]' || github.event.inputs.buildFor == 'Android'}}
name: Trigger android run
runs-on: ubuntu-latest

steps:
- uses: actions/[email protected]
- uses: actions/setup-node@v3
with:
node-version: '18.x'

- name: Cache npm dependencies
uses: actions/[email protected]
with:
path: '~/.npm'
key: ${{ runner.os }}-npm-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-npm-

- name: Install npm dependencies
run: |
npm ci

- name: Generate Android keystore
run: |
echo "$ANDROID_KEYSTORE_FILE" > release.keystore.b64
base64 -d -i release.keystore.b64 > android/app/release.keystore
env:
ANDROID_KEYSTORE_FILE: ${{ secrets.INJI_ANDROID_RELEASE_KEYSTORE }}

- name: Create Android Build
run: |
npx jetify
cd android
./gradlew :app:assembleResidentappRelease
env:
MIMOTO_HOST: ${{ github.event.inputs.backendServiceUrl }}
ESIGNET_HOST: ${{ github.event.inputs.backendServiceUrl }}
APPLICATION_THEME: 'orange'
CREDENTIAL_REGISTRY_EDIT: 'false'
RELEASE_KEYSTORE_ALIAS: 'androidreleasekey'
RELEASE_KEYSTORE_PASSWORD: "${{ secrets.INJI_ANDROID_RELEASE_STOREPASS }}"

- name: Configure AWS CLI
run: |
aws configure set aws_access_key_id ${{ secrets.AWS_DEVICE_FARM_ACCESS_KEY }}
aws configure set aws_secret_access_key ${{ secrets.AWS_DEVICE_FARM_SECRET_KEY }}
aws configure set region us-west-2

- name: Android - Automation
id: android-run
run: |
cd injitest/scripts/ui_automation
RUN_ARN=$(./automation_trigger.sh "Android" "$RUN_NAME" "$TEST_TYPE")
echo "The Run ARN is $RUN_ARN"
env:
RUN_NAME: ${{ github.event.inputs.runName }}
TEST_TYPE: ${{ github.event.inputs.testType }}

# - name: Artifacts download
# id: artifact-download
# run: |
# cd injitest/scripts/ui_automation
# ./download_artifacts.sh "${{ steps.android-run.outputs.run_arn }}" "Android"

# - name: Upload Artifact to Actions
# uses: actions/[email protected]
# with:
# name: Automation Artifacts
# path: injitest/scripts/ui_automation/artifacts/
# retention-days: 5

# - name: Update slack channel
# if: always()
# uses: 8398a7/action-slack@v3
# with:
# status: ${{ job.status }}
# fields: repo,message,author,commit,workflow,job
# env:
# SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_INJI_TEAM }}

ios-ui-automation:
if: ${{ github.event.inputs.buildFor == 'Both[Android and IOS]' || github.event.inputs.buildFor == 'IOS'}}
name: Trigger ios run
runs-on: macos-13

steps:
- uses: actions/[email protected]
- uses: actions/setup-node@v3
with:
node-version: '18.x'

- name: Cache npm dependencies
uses: actions/[email protected]
with:
path: '~/.npm'
key: ${{ runner.os }}-npm-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-npm-

- name: Install npm dependencies
run: |
npm ci

- name: Create iOS Build
run: |
cd ios
pod install && pod install
fastlane ios_ui_automation_build
env:
MIMOTO_HOST: ${{ github.event.inputs.backendServiceUrl }}
ESIGNET_HOST: ${{ github.event.inputs.backendServiceUrl }}
APPLICATION_THEME: 'orange'
APP_FLAVOR: 'residentapp'
CREDENTIAL_REGISTRY_EDIT: 'false'
INJI_IOS_TEMP_KEYCHAIN_PASSWORD: '${{ secrets.INJI_IOS_TEMP_KEYCHAIN_PASSWORD }}'
INJI_IOS_TEMP_KEYCHAIN_USER: '${{ secrets.INJI_IOS_TEMP_KEYCHAIN_USER }}'
GIT_AUTHORIZATION: '${{ secrets.GIT_AUTHORIZATION }}'

- name: Configure AWS CLI
run: |
aws configure set aws_access_key_id ${{ secrets.AWS_DEVICE_FARM_ACCESS_KEY }}
aws configure set aws_secret_access_key ${{ secrets.AWS_DEVICE_FARM_SECRET_KEY }}
aws configure set region us-west-2

- name: IOS - Automation
run: |
cd injitest/scripts/ui_automation
RUN_ARN=$(./automation_trigger.sh "IOS" "$RUN_NAME" "$TEST_TYPE")
echo "The Run ARN is $RUN_ARN"
env:
RUN_NAME: ${{ github.event.inputs.runName }}
TEST_TYPE: ${{ github.event.inputs.testType }}

# - name: Artifacts download
# id: artifact-download
# run: |
# cd injitest/scripts/ui_automation
# ./download_artifacts.sh "${{ steps.android-run.outputs.run_arn }}" "Android"

# - name: Upload Artifact to Actions
# uses: actions/[email protected]
# with:
# name: Automation Artifacts
# path: injitest/scripts/ui_automation/artifacts/
# retention-days: 5

# - name: Update slack channel
# if: always()
# uses: 8398a7/action-slack@v3
# with:
# status: ${{ job.status }}
# fields: repo,message,author,commit,workflow,job
# env:
# SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_INJI_TEAM }}
51 changes: 51 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
# Contributing

Contributions are always welcome, no matter how large or small!

We want this community to be friendly and respectful to each other. Please follow it in all your interactions with the project. Before contributing, please read the [code of conduct](./CODE_OF_CONDUCT.md).

## Development workflow

Refer to [build and deployment](https://docs.mosip.io/inji/build-and-deployment)

### Commit message convention

We follow the [conventional commits specification](https://www.conventionalcommits.org/en) for our commit messages:

- `fix`: bug fixes, e.g. fix crash due to deprecated method.
- `feat`: new features, e.g. add new method to the module.
- `refactor`: code refactor, e.g. migrate from class components to hooks.
- `docs`: changes into documentation, e.g. add usage example for the module..
- `test`: adding or updating tests, e.g. add integration tests using detox.
- `chore`: tooling changes, e.g. change CI config.

Our pre-commit hooks verify that your commit message matches this format when committing.

### Linting and tests

[ESLint](https://eslint.org/), [Prettier](https://prettier.io/), [TypeScript](https://www.typescriptlang.org/)

We use [TypeScript](https://www.typescriptlang.org/) for type checking, [ESLint](https://eslint.org/) with [Prettier](https://prettier.io/) for linting and formatting the code, and [Jest](https://jestjs.io/) for testing.

Our pre-commit hooks verify that the linter and tests pass when committing.

### Scripts

The `package.json` file contains various scripts for common tasks:

- `npm run android:mosip`: to build and run app for Android
- `npm run ios`: to build and run app for iOS
- `npm run lint`: lint files with ESLint.
- `npm run test`: run unit tests with Jest.

### Sending a pull request

> **Working on your first pull request?** You can learn how from this _free_ series: [How to Contribute to an Open Source Project on GitHub](https://app.egghead.io/playlists/how-to-contribute-to-an-open-source-project-on-github).

When you're sending a pull request:

- Prefer small pull requests focused on one change.
- Verify that linters and tests are passing.
- Review the documentation to make sure it looks good.
- Follow the pull request template when opening a pull request.
- For pull requests that change the API or implementation, discuss with maintainers first by opening an issue.
41 changes: 41 additions & 0 deletions MAINTAINERS.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
# Maintainers

## About This File

You can find out who's contributed recently just by looking at GitHub's
[contributors list](../../graphs/contributors). But there are a few more
things you ought to know about who maintains this code, and how they do it:

1. Make sure you read our [contributor guidelines](./CONTRIBUTING.md)
so you understand how we work and how to collaborate effectively.
This includes instructions about pull request and code review protocols,
and it explains what we mean by calling someone a "maintainer" in this
file.
2. Be aware that individual folders in the project may have more
specific maintainers; if you see another `MAINTAINERS.md` in a subfolder,
that governs the tree below it.
3. A lot of interactions with maintainers take place on [Discourse](https://community.mosip.io).
You'll need a Github or Google account to comment there;
creating them is self-service.
4. Issues and features are tracked [here](https://mosip.atlassian.net/jira/software/c/projects/INJIMOB/issues/INJIMOB-875?jql=project%20%3D%20%22Inji%20Mobile%22%20ORDER%20BY%20created%20DESC).
The project name you want, once in Jira, is "Inji".
5. We use developer certificate of origin [DCO](https://developercertificate.org/) in all of MOSIP repositories,
so to get your pull requests accepted, you must certify your commits by signing off on each commit.
You can use the -s command line option in git to append the signoff automatically to your commit message:
`$ git commit -s -m 'This is my commit message'`

## Who To Contact

For ordinary questions, we suggest you contact [active contributors](../../graphs/contributors)
generically, on discourse. If that doesn't get someone's attention,
feel free to contact the contributors individually.

Maintainers are busy and delegate many decisions to other trusted
contributors. However, it is appropriate to contact them if you have a
complex design decision or a controversial PR.

## Maintainers

- Sasikumar - Maintainer. geo=Bangalore, India; github=gsasikumar
- Chandra - Maintainer for Build Scripts. geo=Patna, India; github=ckm007
- Swati - Maintaner. geo=Swati, India; github=swatigoel
Loading
Loading