From 0b9e571e1b408a8918977a65319536bf21a13bc0 Mon Sep 17 00:00:00 2001 From: Abdourahamane Boinaidi Date: Tue, 2 Jul 2024 10:12:32 +0200 Subject: [PATCH] core: Add ci and issue templates --- .github/ISSUE_TEMPLATE/bug_report.md | 34 ++++++++++++++++++++ .github/ISSUE_TEMPLATE/feature_request.md | 22 +++++++++++++ .github/workflows/auto-author-assign.yml | 14 +++++++++ .github/workflows/dependent-issues.yml | 28 +++++++++++++++++ .github/workflows/multiplatform.yml | 38 +++++++++++++++++++++++ 5 files changed, 136 insertions(+) create mode 100644 .github/ISSUE_TEMPLATE/bug_report.md create mode 100644 .github/ISSUE_TEMPLATE/feature_request.md create mode 100644 .github/workflows/auto-author-assign.yml create mode 100644 .github/workflows/dependent-issues.yml create mode 100644 .github/workflows/multiplatform.yml diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md new file mode 100644 index 00000000..cfc1850b --- /dev/null +++ b/.github/ISSUE_TEMPLATE/bug_report.md @@ -0,0 +1,34 @@ +--- +name: Bug report +about: Create a report to help us improve +title: '' +labels: bug +assignees: '' + +--- + +*Note: Please write your issue only in english* + +**Description** +A clear and concise description of what the bug is. + +**Steps to reproduce** +Steps to reproduce the behavior: +1. Go to '...' +2. Click on '....' +3. Scroll down to '....' +4. See error + +**Expected behavior** +A clear and concise description of what you expected to happen. + +**Screenshots** +If applicable, add screenshots to help explain your problem. + +**Smartphone (please complete the following information):** + - Device: [e.g. Samsung S20 Ultra 5G] + - Android version: [e.g. Android 11] + - App version: [e.g. 4.0.1] + +**Additional context** +Add any other context about the problem here. diff --git a/.github/ISSUE_TEMPLATE/feature_request.md b/.github/ISSUE_TEMPLATE/feature_request.md new file mode 100644 index 00000000..0d4bf2c8 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/feature_request.md @@ -0,0 +1,22 @@ +--- +name: Feature request +about: Suggest an idea for this project +title: '' +labels: '' +assignees: '' + +--- + +*Note: Please write your issue only in english* + +**Is your feature request related to a problem? Please describe.** +A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] + +**Describe the solution you'd like** +A clear and concise description of what you want to happen. + +**Describe alternatives you've considered** +A clear and concise description of any alternative solutions or features you've considered. + +**Additional context** +Add any other context or screenshots about the feature request here. diff --git a/.github/workflows/auto-author-assign.yml b/.github/workflows/auto-author-assign.yml new file mode 100644 index 00000000..85901ce7 --- /dev/null +++ b/.github/workflows/auto-author-assign.yml @@ -0,0 +1,14 @@ +name: Auto Author Assign + +on: + pull_request_target: + types: [ opened, reopened ] + +permissions: + pull-requests: write + +jobs: + assign-author: + runs-on: ubuntu-latest + steps: + - uses: toshimaru/auto-author-assign@v2.1.0 diff --git a/.github/workflows/dependent-issues.yml b/.github/workflows/dependent-issues.yml new file mode 100644 index 00000000..d081deed --- /dev/null +++ b/.github/workflows/dependent-issues.yml @@ -0,0 +1,28 @@ +name: Dependent Issues + +on: + issues: + types: + - opened + - edited + - closed + - reopened + pull_request_target: + types: + - opened + - edited + - closed + - reopened + # Makes sure we always add status check for PRs. Useful only if + # this action is required to pass before merging. Otherwise, it + # can be removed. + - synchronize + +jobs: + check: + runs-on: ubuntu-latest + steps: + - uses: z0al/dependent-issues@v1.5.2 + env: + # (Required) The token to use to make API calls to GitHub. + GITHUB_TOKEN: ${{ github.token }} diff --git a/.github/workflows/multiplatform.yml b/.github/workflows/multiplatform.yml new file mode 100644 index 00000000..6bf3c8e4 --- /dev/null +++ b/.github/workflows/multiplatform.yml @@ -0,0 +1,38 @@ +name: Android CI + +on: + pull_request: + +concurrency: + group: ${{ github.head_ref }} + cancel-in-progress: true + +jobs: + + instrumentation-tests: + if: github.event.pull_request.draft == false + runs-on: [ self-hosted, Android ] + + steps: + - name: Cancel Previous Runs + uses: styfle/cancel-workflow-action@0.12.1 + with: + access_token: ${{ github.token }} + + - name: Checkout the code + uses: actions/checkout@v4.1.1 + with: + token: ${{ github.token }} + submodules: recursive + + # Setup Gradle and run Build + - name: Grant execute permission for gradlew + run: chmod +x gradlew + - name: Build with Gradle + run: | + ./gradlew clean + ./gradlew build + + # Run tests + - name: Run Unit tests + run: ./gradlew allTests --stacktrace