From dd02710cfc6bcd6853948a321fad0c15762e44ed Mon Sep 17 00:00:00 2001 From: Abdourahamane Boinaidi Date: Thu, 26 Mar 2026 10:41:16 +0100 Subject: [PATCH 1/2] chore: Add github workflows Signed-off-by: Abdourahamane Boinaidi --- .github/ISSUE_TEMPLATE/bug_report.md | 34 ++++++++++++ .github/ISSUE_TEMPLATE/feature_request.md | 22 ++++++++ .github/workflows/android.yml | 35 ++++++++++++ .github/workflows/auto-author-assign.yml | 14 +++++ .github/workflows/dependent-issues.yml | 28 ++++++++++ .github/workflows/euria-review.yml | 14 +++++ .github/workflows/rebase-default-branch.yml | 61 +++++++++++++++++++++ .github/workflows/semantic-commit.yml | 23 ++++++++ 8 files changed, 231 insertions(+) create mode 100644 .github/ISSUE_TEMPLATE/bug_report.md create mode 100644 .github/ISSUE_TEMPLATE/feature_request.md create mode 100644 .github/workflows/android.yml create mode 100644 .github/workflows/auto-author-assign.yml create mode 100644 .github/workflows/dependent-issues.yml create mode 100644 .github/workflows/euria-review.yml create mode 100644 .github/workflows/rebase-default-branch.yml create mode 100644 .github/workflows/semantic-commit.yml diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md new file mode 100644 index 0000000..cfc1850 --- /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 0000000..0d4bf2c --- /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/android.yml b/.github/workflows/android.yml new file mode 100644 index 0000000..dbc0b60 --- /dev/null +++ b/.github/workflows/android.yml @@ -0,0 +1,35 @@ +name: Multiplatform CI + +on: + pull_request: + +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + +jobs: + tests: + if: github.event.pull_request.draft == false + runs-on: [ self-hosted, Android ] + + steps: + - name: Checkout the code + uses: actions/checkout@v6.0.2 + with: + token: ${{ github.token }} + submodules: recursive + + # Setup Gradle and clean + - name: Grant execute permission for gradlew + run: chmod +x gradlew + - name: Build with Gradle + run: ./gradlew clean + + # Build Example and the Library + - name: Build + run: ./gradlew :Example:assembleDebug :Library:build --stacktrace + + # Run tests + - name: Run Unit tests + run: ./gradlew testDebugUnitTest --stacktrace + diff --git a/.github/workflows/auto-author-assign.yml b/.github/workflows/auto-author-assign.yml new file mode 100644 index 0000000..85901ce --- /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 0000000..d081dee --- /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/euria-review.yml b/.github/workflows/euria-review.yml new file mode 100644 index 0000000..091cb69 --- /dev/null +++ b/.github/workflows/euria-review.yml @@ -0,0 +1,14 @@ +name: Euria Review + +on: + pull_request: + types: [opened, synchronize, reopened] + +concurrency: + group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} + cancel-in-progress: true + +jobs: + euria-review: + uses: infomaniak/.github/.github/workflows/euria-review.yml@v2 + secrets: inherit \ No newline at end of file diff --git a/.github/workflows/rebase-default-branch.yml b/.github/workflows/rebase-default-branch.yml new file mode 100644 index 0000000..75d06be --- /dev/null +++ b/.github/workflows/rebase-default-branch.yml @@ -0,0 +1,61 @@ +# Rebases a pull request on the repo's default branch when the "rebase" label is added +# Link: https://github.com/Infomaniak/.github/blob/main/workflow-templates/rebase-default-branch.yml + +name: Rebase Pull Request + +on: + pull_request: + types: [ labeled ] + +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + +env: + DEFAULT_BRANCH: ${{ github.event.repository.default_branch }} + +jobs: + main: + if: ${{ contains(github.event.*.labels.*.name, 'rebase') }} + name: Rebase + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v5.0.0 + with: + ref: ${{ github.event.pull_request.head.ref }} + fetch-depth: 0 + + # Context: https://httgp.com/signing-commits-in-github-actions + # Link: https://github.com/crazy-max/ghaction-import-gpg/releases + - name: Import bot's GPG key for signing commits + id: import-gpg + uses: crazy-max/ghaction-import-gpg@e89d40939c28e39f97cf32126055eeae86ba74ec # v6.3.0 + with: + gpg_private_key: ${{ secrets.BOT_MOBILE_GPG_PRIVATE_KEY }} + passphrase: ${{ secrets.BOT_MOBILE_GPG_PASSPHRASE }} + git_config_global: true + git_user_signingkey: true + git_commit_gpgsign: true + + - name: perform rebase + run: | + git config --global user.name "dev-mobile-bot" + git config --global user.email "mobile+github-bot@infomaniak-dev.ch" + git status + git pull + git checkout "$DEFAULT_BRANCH" + git status + git pull + git checkout "$GITHUB_HEAD_REF" + git rebase "$DEFAULT_BRANCH" + git push --force-with-lease + git status + + # Context: https://github.com/marketplace/actions/actions-ecosystem-remove-labels + # Link: https://github.com/actions-ecosystem/action-remove-labels/releases + - name: remove label + if: always() + uses: actions-ecosystem/action-remove-labels@2ce5d41b4b6aa8503e285553f75ed56e0a40bae0 # v1.3.0 + with: + labels: rebase diff --git a/.github/workflows/semantic-commit.yml b/.github/workflows/semantic-commit.yml new file mode 100644 index 0000000..63b9ed7 --- /dev/null +++ b/.github/workflows/semantic-commit.yml @@ -0,0 +1,23 @@ +name: 'PR and Commit Message Check' +on: + pull_request_target: + types: + - opened + - edited + - reopened + - synchronize + +jobs: + check-commit-message: + name: Check Commit Message + runs-on: ubuntu-latest + steps: + - name: Check Commit Message + uses: gsactions/commit-message-checker@v2 + with: + pattern: '^Merge .+|(^(feat|fix|chore|docs|style|refactor|perf|ci|test)(\(.+\))?: [A-Z0-9].+)' + error: 'Commit messages and PR title should match conventional commit convention and start with an uppercase.' + excludeDescription: 'true' + excludeTitle: 'false' + checkAllCommitMessages: 'true' + accessToken: ${{ secrets.GITHUB_TOKEN }} From cfea7498975c984cf542b61ea7aa935448660087 Mon Sep 17 00:00:00 2001 From: Abdourahamane Boinaidi Date: Thu, 26 Mar 2026 10:46:47 +0100 Subject: [PATCH 2/2] chore: Rename the name of the workflow Signed-off-by: Abdourahamane Boinaidi --- .github/workflows/android.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/android.yml b/.github/workflows/android.yml index dbc0b60..052275e 100644 --- a/.github/workflows/android.yml +++ b/.github/workflows/android.yml @@ -1,4 +1,4 @@ -name: Multiplatform CI +name: Android CI on: pull_request: