feat: add reply in private feature #18700
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: "iOS Tests" | |
| on: | |
| workflow_dispatch: | |
| merge_group: | |
| pull_request: | |
| types: [ opened, synchronize ] # Don't rerun on `edited` to save time | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.event.merge_group.head_sha }} | |
| cancel-in-progress: true | |
| permissions: | |
| contents: read # required for actions/checkout and repository metadata reads | |
| jobs: | |
| detekt: | |
| name: Detekt | |
| uses: ./.github/workflows/codestyle.yml | |
| gradle-run-tests: | |
| name: Gradle Run Tests | |
| needs: [detekt] | |
| permissions: | |
| contents: read # required to read repository metadata in private repositories | |
| issues: read # required to find related pull requests in private repositories | |
| checks: write # required to publish unit test check runs | |
| pull-requests: write # required to publish pull request comments | |
| runs-on: macos-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 | |
| with: | |
| fetch-depth: 0 | |
| persist-credentials: false | |
| - name: Setup Java and Gradle | |
| uses: ./.github/actions/setup-java-gradle | |
| - name: Restore Kotlin/Native tooling cache (.konan) | |
| id: konan-cache | |
| uses: actions/cache/restore@27d5ce7f107fe9357f9df03efb73ab90386fccae | |
| with: | |
| path: ~/.konan | |
| key: ${{ runner.os }}-${{ runner.arch }}-konan-${{ hashFiles('gradle.properties', 'gradle/libs.versions.toml') }} | |
| restore-keys: | | |
| ${{ runner.os }}-${{ runner.arch }}-konan- | |
| - name: iOS Tests | |
| run: ./gradlew iOSOnlyAffectedTest | |
| env: | |
| GITHUB_USER: ${{ github.actor }} | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Generate aggregated iOS test report | |
| if: always() | |
| run: ./gradlew aggregateIosSimulatorArm64TestReport | |
| - name: Archive Test Reports | |
| if: always() | |
| uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a | |
| with: | |
| name: test-reports | |
| path: | | |
| build/reports/tests/iosSimulatorArm64Test/** | |
| ./**/build/reports/tests/** | |
| - name: Archive Test Results | |
| if: always() | |
| uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a | |
| with: | |
| name: test-results | |
| path: | | |
| ./**/build/test-results/testDebugUnitTest/**/*.xml | |
| ./**/build/test-results/**/*.xml | |
| ./**/build/test-results/iosSimulatorArm64Test/** | |
| - name: Publish Unit Test Results | |
| uses: EnricoMi/publish-unit-test-result-action/macos@2ceeed2b8f26e15b06c3846719f75354febd9e7b | |
| if: ${{ always() }} | |
| with: | |
| files: | | |
| **/build/test-results/testDebugUnitTest/**/*.xml | |
| **/build/test-results/**/*.xml | |
| - name: Cleanup Gradle Cache | |
| # Remove some files from the Gradle cache, so they aren't cached by GitHub Actions. | |
| # Restoring these files from a GitHub Actions cache might cause problems for future builds. | |
| run: | | |
| rm -f ~/.gradle/caches/modules-2/modules-2.lock | |
| rm -f ~/.gradle/caches/modules-2/gc.properties | |
| - name: Save Kotlin/Native tooling cache (.konan) | |
| if: always() && steps.konan-cache.outputs.cache-hit != 'true' | |
| uses: actions/cache/save@27d5ce7f107fe9357f9df03efb73ab90386fccae | |
| with: | |
| path: ~/.konan | |
| key: ${{ steps.konan-cache.outputs.cache-primary-key }} | |
| upload-test-results-datadadog: | |
| name: Upload Test Results Datadadog | |
| runs-on: ubuntu-latest | |
| needs: gradle-run-tests | |
| if: always() | |
| steps: | |
| - name: Download tests results | |
| uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c | |
| continue-on-error: true | |
| with: | |
| name: test-results | |
| - uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e | |
| with: | |
| node-version: 18 | |
| - name: Install datadog-ci | |
| run: npm install -g @datadog/datadog-ci | |
| - name: "Upload results" | |
| env: | |
| DATADOG_API_KEY: ${{ secrets.DD_API_KEY }} | |
| DD_ENV: ci | |
| DATADOG_SITE: datadoghq.eu | |
| run: | | |
| find . -name "*.xml" -type f | sed 's/ /\\ /g' | tr '\n' ' ' | xargs -L 1 datadog-ci junit upload --service kalium-ios . |