feat: adopt type field from user entity - tests (WPB-20356) #18486
Workflow file for this run
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: "JVM & JS Tests" | |
| on: | |
| merge_group: | |
| pull_request: | |
| types: [ opened, synchronize ] # Don't rerun on `edited` to save time | |
| push: | |
| branches: # Runs on develop to have the coverage diff on every PR | |
| - 'develop' | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.event.merge_group.head_sha }} | |
| cancel-in-progress: true | |
| env: | |
| CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} | |
| jobs: | |
| detekt: | |
| uses: ./.github/workflows/codestyle.yml | |
| gradle-run-tests: | |
| needs: [ detekt ] | |
| runs-on: ubuntu-latest | |
| # TODO: When migrating away from Cryptobox, use a regular Ubuntu machine with JDK 17 and caching | |
| container: kubazwire/cryptobox:1.0.0 | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v5 | |
| with: | |
| fetch-depth: 0 | |
| - name: Install build dependencies | |
| run: | | |
| apt-get update | |
| apt-get install -y build-essential | |
| - name: Setup Java and Gradle | |
| uses: ./.github/actions/setup-java-gradle | |
| - name: Build the CLI App | |
| env: | |
| GITHUB_USER: ${{ github.actor }} | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| run: | | |
| ./gradlew :cli:compileKotlinJvm -Djava.library.path=$LD_LIBRARY_PATH | |
| - name: Build the samples | |
| env: | |
| GITHUB_USER: ${{ github.actor }} | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| run: | | |
| ./gradlew :samples:compileKotlinJvm | |
| - name: Build the testservice | |
| env: | |
| GITHUB_USER: ${{ github.actor }} | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| run: | | |
| ./gradlew :testservice:compileKotlin -Djava.library.path=$LD_LIBRARY_PATH | |
| ./gradlew :testservice:test | |
| - name: Test with Gradle | |
| run: | | |
| ./gradlew jvmTest koverXmlReport -Djava.library.path=$LD_LIBRARY_PATH | |
| ./gradlew jsTest | |
| - name: Archive Test Reports | |
| if: always() | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: test-reports | |
| path: ./**/build/reports/tests/** | |
| - name: Archive Test Results | |
| if: always() | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: test-results | |
| path: ./**/build/test-results/**/*.xml | |
| - name: Install Pip for test result publishing | |
| run: | | |
| apt-get update | |
| apt-get install -y -qq --no-install-recommends python3-pip python3-venv | |
| - name: Publish Unit Test Results | |
| uses: EnricoMi/publish-unit-test-result-action/linux@v2 | |
| if: ${{ always() }} | |
| with: | |
| files: | | |
| **/build/test-results/**/*.xml | |
| - name: Install Git | |
| run: apt-get update && apt-get install -y -qq git | |
| - name: Upload test report to codecov | |
| uses: codecov/codecov-action@18283e04ce6e62d37312384ff67231eb8fd56d24 | |
| with: | |
| token: ${{ secrets.CODECOV_TOKEN }} | |
| files: "build/reports/kover/report.xml" | |
| - name: Archive Kover report | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: kover-report | |
| path: build/reports/kover/report.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 | |
| upload-test-results-datadadog: | |
| runs-on: ubuntu-latest | |
| needs: gradle-run-tests | |
| if: always() | |
| steps: | |
| - name: Download tests results | |
| uses: actions/[email protected] | |
| continue-on-error: true | |
| - name: Display structure of downloaded files | |
| run: ls -R | |
| - uses: actions/setup-node@v5 | |
| 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-jvm . |