diff --git a/.github/ISSUE_TEMPLATE/bug.yml b/.github/ISSUE_TEMPLATE/bug.yml new file mode 100644 index 0000000000..dcb9f0a766 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/bug.yml @@ -0,0 +1,74 @@ +name: Bug report for the Element Android app +description: Report any issues that you have found with the Element app. Please [check open issues](https://github.com/vector-im/element-android/issues) first, in case it has already been reported. +labels: [T-Defect] +body: + - type: markdown + attributes: + value: | + Thanks for taking the time to fill out this bug report! + + Please report security issues by email to security@matrix.org + - type: textarea + id: reproduction-steps + attributes: + label: Steps to reproduce + description: Please attach screenshots, videos or logs if you can. + placeholder: Tell us what you see! + value: | + 1. Where are you starting? What can you see? + 2. What do you click? + 3. More steps… + validations: + required: true + - type: textarea + id: result + attributes: + label: What happened? + placeholder: Tell us what went wrong + value: | + ### What did you expect? + + ### What happened? + validations: + required: true + - type: input + id: device + attributes: + label: Your phone model + placeholder: e.g. Samsung S6 + validations: + required: false + - type: input + id: os + attributes: + label: Operating system version + placeholder: e.g. Android 10.0 + validations: + required: false + - type: input + id: version + attributes: + label: Application version and app store + description: You can find the version information in Settings -> Help & About. + placeholder: e.g. Element version 1.7.34, olm version 3.2.3 from F-Droid + validations: + required: false + - type: input + id: homeserver + attributes: + label: Homeserver + description: Which server is your account registered on? + placeholder: e.g. matrix.org + validations: + required: false + - type: dropdown + id: rageshake + attributes: + label: Have you submitted a rageshake? + description: | + Did you know that you can shake your phone to submit logs for this issue? Trigger the defect, then shake your phone and you will see a popup asking if you would like to open the bug report screen. Click YES, and describe the issue, mentioning that you have also filed a bug. Submit the report to send anonymous logs to the developers. + options: + - 'Yes' + - 'No' + validations: + required: true diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md deleted file mode 100644 index f2fa4ef02d..0000000000 --- a/.github/ISSUE_TEMPLATE/bug_report.md +++ /dev/null @@ -1,34 +0,0 @@ ---- -name: Bug report -about: Create a report to help us improve Element -title: '' -labels: '' -assignees: '' - ---- - -**Describe the bug** -A clear and concise description of what the bug is. - -**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 S6] - - OS: [e.g. Android 6.0] - -**Additional context** - - App version and store [e.g. 1.0.0 - F-Droid] - - Homeserver: [e.g. matrix.org] - -Add any other context about the problem here. diff --git a/.github/ISSUE_TEMPLATE/enhancement.yml b/.github/ISSUE_TEMPLATE/enhancement.yml new file mode 100644 index 0000000000..5d9cfb3c88 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/enhancement.yml @@ -0,0 +1,36 @@ +name: Enhancement request +description: Do you have a suggestion or feature request? +labels: [T-Enhancement] +body: + - type: markdown + attributes: + value: | + Thank you for taking the time to propose a new feature or make a suggestion. + - type: textarea + id: usecase + attributes: + label: Your use case + description: What would you like to be able to do? Please feel welcome to include screenshots or mock ups. + placeholder: Tell us what you would like to do! + value: | + #### What would you like to do? + + #### Why would you like to do it? + + #### How would you like to achieve it? + validations: + required: true + - type: textarea + id: alternative + attributes: + label: Have you considered any alternatives? + placeholder: A clear and concise description of any alternative solutions or features you've considered. + validations: + required: false + - type: textarea + id: additional-context + attributes: + label: Additional context + placeholder: Is there anything else you'd like to add? + validations: + required: false diff --git a/.github/ISSUE_TEMPLATE/feature_request.md b/.github/ISSUE_TEMPLATE/feature_request.md deleted file mode 100644 index 73c93186d7..0000000000 --- a/.github/ISSUE_TEMPLATE/feature_request.md +++ /dev/null @@ -1,20 +0,0 @@ ---- -name: Feature request -about: Suggest an idea for this project -title: '' -labels: type:suggestion -assignees: '' - ---- - -**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/ISSUE_TEMPLATE/matrix-sdk.md b/.github/ISSUE_TEMPLATE/matrix-sdk.md deleted file mode 100644 index 30f705a575..0000000000 --- a/.github/ISSUE_TEMPLATE/matrix-sdk.md +++ /dev/null @@ -1,10 +0,0 @@ ---- -name: Matrix SDK -about: Report issue or ask for a feature regarding the Android Matrix SDK -title: "[SDK] " -labels: matrix-sdk -assignees: '' - ---- - - diff --git a/.github/ISSUE_TEMPLATE/matrix-sdk.yml b/.github/ISSUE_TEMPLATE/matrix-sdk.yml new file mode 100644 index 0000000000..4033423dd5 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/matrix-sdk.yml @@ -0,0 +1,20 @@ +name: Matrix SDK bug or enhancement +description: Report issue or ask for a feature in the [Android Matrix SDK](https://github.com/matrix-org/matrix-android-sdk2) +title: "[SDK] " +labels: [matrix-sdk] + +body: + - type: markdown + attributes: + value: | + Thanks for taking the time to fill out this issue! + + Please report security issues by email to security@matrix.org + - type: textarea + id: description + attributes: + label: Description + description: Report issue or ask for a feature in the [Android Matrix SDK](https://github.com/matrix-org/matrix-android-sdk2) + placeholder: This issue template should be used by third party application maintainers, to report a bug or to request a feature on the SDK module of the Element Android application. + validations: + required: true diff --git a/.github/ISSUE_TEMPLATE/release.yml b/.github/ISSUE_TEMPLATE/release.yml new file mode 100644 index 0000000000..903c05c5d3 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/release.yml @@ -0,0 +1,106 @@ +name: Release checklist +description: Checklist for each release. This template is only for the core team. +title: "[Release] Element Android v" +labels: [🚀 Release] +assignees: + - bmarty + +body: + - type: textarea + id: checklist + attributes: + label: Release checklist + description: For the template example, we are releasing the version 1.1.10. Replace 1.1.10 with the version in the issue body. + placeholder: | + If you are reading this, you have deleted the content of the release template: undo the deletion or start again. + value: | + ### Before the release + + - [ ] Weblate sync, fix lint issue if any (in a dedicated PR) + - [ ] Check the update of the store descriptions (using Google Translate if necessary) to ensure that the changes are acceptable to be published to the stores. + - [ ] Run the script `./tools/release/pushPlayStoreMetaData.sh`. You can check in the GooglePlay console the Activity log to check the effect. + + ### Do the release + + - [ ] Create release with gitflow, branch name `release/1.1.10` + - [ ] Run `./tools/import_emojis.py` and commit the change if any. + - [ ] Run `./tools/import_sas_strings.py` and commit the change if any. If there is no change since a while, ping Travis + - [ ] Check the crashes from the PlayStore + - [ ] Check the rageshake with the current dev version: https://github.com/matrix-org/element-android-rageshakes/labels/1.1.10-dev + - [ ] Run the integration test, and especially `UiAllScreensSanityTest.allScreensTest()` + - [ ] Create an account on matrix.org + - [ ] Run towncrier: `towncrier --version v1.1.10 --draft` (remove `--draft` do write the file CHANGES.md) + - [ ] Add file for fastlane under ./fastlane/metadata/android/en-US/changelogs + - [ ] Push the branch and start a draft PR (will not be merged), to check that the CI is happy with all the changes. + - [ ] Finish release with gitflow, delete the draft PR + - [ ] Push `main` and the new tag `v1.1.10` to origin + - [ ] Checkout `develop` + - [ ] Increase version in `./vector/build.gradle` + - [ ] Change the value of SDK_VERSION in the file `./matrix-sdk-android/build.gradle` + - [ ] Commit and push `develop` + - [ ] Wait for [Buildkite](https://buildkite.com/matrix-dot-org/element-android/builds?branch=main) to build the `main` branch. + - [ ] Run the script `~/scripts/releaseElement.sh`. It will download the APKs from Buildkite check them and sign them. + - [ ] Install the APK on your phone to check that the upgrade went well (no init sync, etc.) + - [ ] Create a new beta release on the GooglePlay console and upload the 4 signed Apks. + - [ ] Check that the version codes are correct + - [ ] Copy the fastlane change to the GooglePlay console in the section en-GB. + - [ ] Push to beta release to 100% of the users + - [ ] Create the release on gitHub [from the tag](https://github.com/vector-im/element-android/tags), copy paste the block from the file CHANGES.md + - [ ] Add the 4 signed APKs to the GitHub release + - [ ] Ping the Android Internal room + - [ ] Add an entry in the internal diary + + ### Once Live on PlayStore + + - [ ] Ping the Android public room and update its topic + + ### After at least 2 days + + - [ ] Check the [rageshakes](https://github.com/matrix-org/element-android-rageshakes/issues) + - [ ] Check the crash reports on the GooglePlay console + - [ ] Check the Android Element room for any reported issues on the new version + - [ ] If all is OK, push to production and notify Markus (Bubu) to release the F-Droid version + - [ ] Ping the Android public room and update its topic with the new available version + + ### Android SDK2 + + - [ ] Checkout the `main` branch on Element Android project + + #### On the SDK2 project + + https://github.com/matrix-org/matrix-android-sdk2 + + - [ ] Create a release with GitFlow + - [ ] Update the value of VERSION_NAME in the file gradle.properties + - [ ] Update the files `./build.gradle` and `./gradle/gradle-wrapper.properties` manually, to use the latest version for the dependency. You can get inspired by the same files on Element Android project. + - [ ] Run the script `./tools/import_from_element.sh` + - [ ] Check the diff in the file `./matrix-sdk-android/build.gradle` and restore what may have been erased (in particular the line `apply plugin: "com.vanniktech.maven.publish"` and the line about the version) + - [ ] Let the script finish to build the library + - [ ] Update the file `CHANGES.md` + - [ ] Finish the release using GitFlow + - [ ] Push the branch `main`, the new tag and the branch `develop` to origin + + ##### Release on MavenCentral + + - [ ] Run the command `./gradlew publish --no-daemon --no-parallel`. You'll need some non-public element to do so + - [ ] Connect to https://s01.oss.sonatype.org + - [ ] Click on Staging Repositories and check the the files have been uploaded + - [ ] Click on close + - [ ] Wait (check Activity tab until step "Repository closed" is displayed) + - [ ] Click on release. The staging repository will disappear + - [ ] Check that the release is available in https://repo1.maven.org/maven2/org/matrix/android/matrix-android-sdk2/ (it can take a few minutes) + + ##### Release on GitHub + + - [ ] Create the release on GitHub from [the tag](https://github.com/matrix-org/matrix-android-sdk2/tags) + - [ ] Upload the AAR on the GitHub release + + ### Android SDK2 sample + + https://github.com/matrix-org/matrix-android-sdk2-sample + + - [ ] Update the dependency to the new version of the SDK2. It can take some time for MavenCentral to make the librarie available. You can check status on https://repo1.maven.org/maven2/org/matrix/android/matrix-android-sdk2/ + - [ ] Build and run the sample, you may have to fix some API break + - [ ] Commit and push directly on `main` + validations: + required: true diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md index 34d7b40a88..2048b823f0 100644 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -1,10 +1,16 @@ ### Pull Request Checklist - + - [ ] Changes has been tested on an Android device or Android emulator with API 21 - [ ] UI change has been tested on both light and dark themes +- [ ] Accessibility has been taken into account. See https://github.com/vector-im/element-android/blob/develop/CONTRIBUTING.md#accessibility - [ ] Pull request is based on the develop branch -- [ ] Pull request updates [CHANGES.md](https://github.com/vector-im/element-android/blob/develop/CHANGES.md) +- [ ] Pull request includes a new file under ./changelog.d. See https://github.com/vector-im/element-android/blob/develop/CONTRIBUTING.md#changelog - [ ] Pull request includes screenshots or videos if containing UI changes - [ ] Pull request includes a [sign off](https://github.com/matrix-org/synapse/blob/master/CONTRIBUTING.md#sign-off) +- [ ] You've made a self review of your PR +- [ ] If you have modified the screen flow, or added new screens to the application, you have updated the test [UiAllScreensSanityTest.allScreensTest()](https://github.com/vector-im/element-android/blob/main/vector/src/androidTest/java/im/vector/app/ui/UiAllScreensSanityTest.kt#L73) \ No newline at end of file diff --git a/.github/dependabot.yml b/.github/dependabot.yml new file mode 100644 index 0000000000..e552f5fd43 --- /dev/null +++ b/.github/dependabot.yml @@ -0,0 +1,23 @@ +# To get started with Dependabot version updates, you'll need to specify which +# package ecosystems to update and where the package manifests are located. +# Please see the documentation for all configuration options: +# https://help.github.com/github/administering-a-repository/configuration-options-for-dependency-updates + +version: 2 +updates: + # Updates for Github Actions used in the repo + - package-ecosystem: "github-actions" + directory: "/" + schedule: + interval: "weekly" + # Updates for Gradle dependencies used in the app + - package-ecosystem: gradle + directory: "/" + schedule: + interval: "daily" + open-pull-requests-limit: 200 + reviewers: + - "bmarty" +### ignore: +### - dependency-name: com.squareup.okhttp3:logging-interceptor +### versions: "> 3.12.10" diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 0000000000..91dc6d830b --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,65 @@ +name: APK Build + +on: + pull_request: { } + push: + branches: [ main, develop ] + +# Enrich gradle.properties for CI/CD +env: + CI_GRADLE_ARG_PROPERTIES: > + -Porg.gradle.jvmargs=-Xmx2g + -Porg.gradle.parallel=false + +jobs: + debug: + name: Build debug APKs (${{ matrix.target }}) + runs-on: ubuntu-latest + if: github.ref != 'refs/heads/main' + strategy: + fail-fast: false + matrix: + target: [ Gplay, Fdroid ] + steps: + - uses: actions/checkout@v2 + - uses: actions/cache@v2 + with: + path: | + ~/.gradle/caches + ~/.gradle/wrapper + key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }} + restore-keys: | + ${{ runner.os }}-gradle- + - name: Assemble ${{ matrix.target }} debug apk + run: ./gradlew assemble${{ matrix.target }}Debug $CI_GRADLE_ARG_PROPERTIES --stacktrace + - name: Upload ${{ matrix.target }} debug APKs + uses: actions/upload-artifact@v2 + with: + name: vector-${{ matrix.target }}-debug + path: | + vector/build/outputs/apk/*/debug/*.apk + + release: + name: Build unsigned GPlay APKs + runs-on: ubuntu-latest + if: github.ref == 'refs/heads/main' + steps: + - uses: actions/checkout@v2 + - uses: actions/cache@v2 + with: + path: | + ~/.gradle/caches + ~/.gradle/wrapper + key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }} + restore-keys: | + ${{ runner.os }}-gradle- + - name: Assemble GPlay unsigned apk + run: ./gradlew clean assembleGplayRelease $CI_GRADLE_ARG_PROPERTIES --stacktrace + - name: Upload Gplay unsigned APKs + uses: actions/upload-artifact@v2 + with: + name: vector-gplay-release-unsigned + path: | + vector/build/outputs/apk/*/release/*.apk + +# TODO: add exodus checks diff --git a/.github/workflows/integration.yml b/.github/workflows/integration.yml new file mode 100644 index 0000000000..c18ca69fde --- /dev/null +++ b/.github/workflows/integration.yml @@ -0,0 +1,86 @@ +name: Integration Test + +on: + pull_request: { } + push: + branches: [ main, develop ] + +# Enrich gradle.properties for CI/CD +env: + CI_GRADLE_ARG_PROPERTIES: > + -Porg.gradle.jvmargs=-Xmx2g + -Porg.gradle.parallel=false + +jobs: + # Temporary add build of Android tests, which cannot be run on the CI right now, but they need to at least compile + # So it will be mandatory for this action to be successful on every PRs + compile-android-test: + name: Compile Android tests + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - uses: actions/cache@v2 + with: + path: | + ~/.gradle/caches + ~/.gradle/wrapper + key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }} + restore-keys: | + ${{ runner.os }}-gradle- + - name: Compile Android tests + run: ./gradlew clean assembleAndroidTest $CI_GRADLE_ARG_PROPERTIES --stacktrace -PallWarningsAsErrors=false + + integration-tests: + name: Integration Tests (Synapse) + runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + api-level: [28] + steps: + - uses: actions/checkout@v2 + - uses: gradle/wrapper-validation-action@v1 + - uses: actions/setup-java@v2 + with: + distribution: 'adopt' + java-version: 11 + - name: Set up Python 3.8 + uses: actions/setup-python@v2 + with: + python-version: 3.8 + - name: Cache pip + uses: actions/cache@v2 + with: + path: ~/.cache/pip + key: ${{ runner.os }}-pip + restore-keys: | + ${{ runner.os }}-pip- + ${{ runner.os }}- + - uses: actions/cache@v2 + with: + path: | + ~/.gradle/caches + ~/.gradle/wrapper + key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }} + restore-keys: | + ${{ runner.os }}-gradle- + - name: Start synapse server + run: | + python3 -m venv .synapse + source .synapse/bin/activate + pip install synapse matrix-synapse + curl -sL https://raw.githubusercontent.com/matrix-org/synapse/develop/demo/start.sh --no-rate-limit \ + | sed s/127.0.0.1/0.0.0.0/g | bash + - name: Run integration tests on API ${{ matrix.api-level }} + uses: reactivecircus/android-emulator-runner@v2 + with: + api-level: ${{ matrix.api-level }} + #arch: x86_64 + #disable-animations: true + # script: ./gradlew -PallWarningsAsErrors=false vector:connectedAndroidTest matrix-sdk-android:connectedAndroidTest + arch: x86 + profile: Nexus 5X + force-avd-creation: false + emulator-options: -no-snapshot-save -no-window -gpu swiftshader_indirect -noaudio -no-boot-anim -camera-back none + emulator-build: 7425822 + script: ./gradlew $CI_GRADLE_ARG_PROPERTIES -PallWarningsAsErrors=false connectedCheck --stacktrace diff --git a/.github/workflows/quality.yml b/.github/workflows/quality.yml new file mode 100644 index 0000000000..0f11915258 --- /dev/null +++ b/.github/workflows/quality.yml @@ -0,0 +1,77 @@ +name: Code Quality Checks + +on: + pull_request: { } + push: + branches: [ main, develop ] + +jobs: + check: + name: Project Check Suite + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - name: Run code quality check suite + run: ./tools/check/check_code_quality.sh + + klint: + name: Kotlin Linter + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - name: Run klint + run: | + curl -sSLO https://github.com/pinterest/ktlint/releases/download/0.36.0/ktlint && chmod a+x ktlint + ./ktlint --android --experimental -v + +# Lint for main module and all the other modules + android-lint: + name: Android Linter + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - uses: actions/cache@v2 + with: + path: | + ~/.gradle/caches + ~/.gradle/wrapper + key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }} + restore-keys: | + ${{ runner.os }}-gradle- + - name: Lint analysis + run: ./gradlew clean :vector:lint --stacktrace + - name: Upload reports + uses: actions/upload-artifact@v2 + with: + name: lint-report + path: | + vector/build/reports/*.* + +# Lint for Gplay and Fdroid release APK + apk-lint: + name: Lint APK (${{ matrix.target }}) + runs-on: ubuntu-latest + if: github.ref != 'refs/heads/main' + strategy: + fail-fast: false + matrix: + target: [ Gplay, Fdroid ] + steps: + - uses: actions/checkout@v2 + - uses: actions/cache@v2 + with: + path: | + ~/.gradle/caches + ~/.gradle/wrapper + key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }} + restore-keys: | + ${{ runner.os }}-gradle- + - name: Lint ${{ matrix.target }} release + run: ./gradlew clean lint${{ matrix.target }}Release --stacktrace + - name: Upload ${{ matrix.target }} linting report + uses: actions/upload-artifact@v2 + if: always() + with: + name: release-lint-report-${{ matrix.target }} + path: | + vector/build/reports/*.* diff --git a/.github/workflows/sanity_test.yml b/.github/workflows/sanity_test.yml new file mode 100644 index 0000000000..3ab0017ce2 --- /dev/null +++ b/.github/workflows/sanity_test.yml @@ -0,0 +1,56 @@ +name: Sanity Test + +on: + pull_request: { } + push: + branches: [ main, develop ] + +# Enrich gradle.properties for CI/CD +env: + CI_GRADLE_ARG_PROPERTIES: > + -Porg.gradle.jvmargs=-Xmx2g + -Porg.gradle.parallel=false + +jobs: + integration-tests: + name: Sanity Tests (Synapse) + runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + api-level: [28] + steps: + - uses: actions/checkout@v2 + - name: Set up Python 3.8 + uses: actions/setup-python@v2 + with: + python-version: 3.8 + - name: Cache pip + uses: actions/cache@v2 + with: + path: ~/.cache/pip + key: ${{ runner.os }}-pip + restore-keys: | + ${{ runner.os }}-pip- + ${{ runner.os }}- + - uses: actions/cache@v2 + with: + path: | + ~/.gradle/caches + ~/.gradle/wrapper + key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }} + restore-keys: | + ${{ runner.os }}-gradle- + - name: Start synapse server + run: | + python3 -m venv .synapse + source .synapse/bin/activate + pip install synapse matrix-synapse + curl -sL https://raw.githubusercontent.com/matrix-org/synapse/develop/demo/start.sh --no-rate-limit \ + | sed s/127.0.0.1/0.0.0.0/g | bash + - name: Run sanity tests on API ${{ matrix.api-level }} + uses: reactivecircus/android-emulator-runner@v2 + with: + api-level: ${{ matrix.api-level }} + script: ./gradlew $CI_GRADLE_ARG_PROPERTIES -PallWarningsAsErrors=false connectedGplayDebugAndroidTest -Pandroid.testInstrumentationRunnerArguments.class=im.vector.app.ui.UiAllScreensSanityTest + diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml new file mode 100644 index 0000000000..50195638de --- /dev/null +++ b/.github/workflows/tests.yml @@ -0,0 +1,36 @@ +name: Test + +on: + pull_request: {} + push: + branches: [main, develop] + +# Enrich gradle.properties for CI/CD +env: + CI_GRADLE_ARG_PROPERTIES: > + -Porg.gradle.jvmargs=-Xmx2g + -Porg.gradle.parallel=false + +jobs: + unit-tests: + name: Run Unit Tests + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - uses: actions/cache@v2 + with: + path: | + ~/.gradle/caches + ~/.gradle/wrapper + key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }} + restore-keys: | + ${{ runner.os }}-gradle- + - name: Run unit tests + run: ./gradlew clean test $CI_GRADLE_ARG_PROPERTIES -PallWarningsAsErrors=false --stacktrace + - name: Publish Unit Test Results + uses: EnricoMi/publish-unit-test-result-action@v1 + if: always() && + github.event.sender.login != 'dependabot[bot]' && + ( github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name == github.repository ) + with: + files: ./**/build/test-results/**/*.xml diff --git a/.gitignore b/.gitignore index 4a264a28d8..935a3fc329 100644 --- a/.gitignore +++ b/.gitignore @@ -8,9 +8,12 @@ .idea/*.xml .DS_Store /build +/benchmark-out /captures .externalNativeBuild /tmp +/fastlane/private +/fastlane/report.xml ktlint diff --git a/.idea/codeStyles/Project.xml b/.idea/codeStyles/Project.xml index 89a7c466fd..523496e317 100644 --- a/.idea/codeStyles/Project.xml +++ b/.idea/codeStyles/Project.xml @@ -7,15 +7,6 @@ -