From ff7b808d6d1cb29f0a4af2f7be66f73ff32095d9 Mon Sep 17 00:00:00 2001 From: "dmytro.dmytryshyn" Date: Mon, 22 Dec 2025 15:24:51 +0200 Subject: [PATCH 01/20] Add basic GA setup --- .github/workflows/ci.yaml | 38 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100644 .github/workflows/ci.yaml diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml new file mode 100644 index 00000000..7640fb91 --- /dev/null +++ b/.github/workflows/ci.yaml @@ -0,0 +1,38 @@ +--- +name: 'CI: Tests' + +on: + pull_request: + branches: + - '**' + push: + branches: + - 'main' + tags: + - 'v*' + +permissions: + contents: read + checks: write # For publishing test results + +jobs: + run-unit-tests: + name: 'Run Unit Tests' + runs-on: macos-14 # macOS M1 runner + timeout-minutes: 10 + + steps: + - name: Checkout code + uses: actions/checkout@v6 + + - name: Set up JDK 17 + uses: actions/setup-java@v5 + with: + distribution: 'temurin' + java-version: '17' + + - name: Setup Android SDK + uses: android-actions/setup-android@v3 + + - name: Setup Gradle + uses: gradle/actions/setup-gradle@v5 \ No newline at end of file From a3a5f130413b79d8af9a7a1e9eba821e9fdefb1e Mon Sep 17 00:00:00 2001 From: "dmytro.dmytryshyn" Date: Mon, 22 Dec 2025 15:27:33 +0200 Subject: [PATCH 02/20] Add submodules support --- .github/workflows/ci.yaml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 7640fb91..054557bf 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -24,6 +24,8 @@ jobs: steps: - name: Checkout code uses: actions/checkout@v6 + with: + submodules: true - name: Set up JDK 17 uses: actions/setup-java@v5 From db0e462b484d0d0a4b56208afea114abedae700b Mon Sep 17 00:00:00 2001 From: "dmytro.dmytryshyn" Date: Mon, 22 Dec 2025 15:28:49 +0200 Subject: [PATCH 03/20] Add detekt & unit tests step --- .github/workflows/ci.yaml | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 054557bf..dac42cfc 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -37,4 +37,10 @@ jobs: uses: android-actions/setup-android@v3 - name: Setup Gradle - uses: gradle/actions/setup-gradle@v5 \ No newline at end of file + uses: gradle/actions/setup-gradle@v5 + + - name: Run Detekt + run: ./gradlew app:detekt vgsshow:detekt --continue --parallel + + - name: Run Unit Tests + run: ./gradlew testDebugUnitTest --continue --stacktrace \ No newline at end of file From 5a24f101d172824a13015b3c65f0423d07229d7a Mon Sep 17 00:00:00 2001 From: "dmytro.dmytryshyn" Date: Mon, 22 Dec 2025 16:26:53 +0200 Subject: [PATCH 04/20] Restore gradle to speed up job --- .github/workflows/ci.yaml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index dac42cfc..7561b8ba 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -39,6 +39,12 @@ jobs: - name: Setup Gradle uses: gradle/actions/setup-gradle@v5 + - name: Restore Gradle cache + uses: actions/cache@v3 + with: + path: ~/.gradle + key: gradle-${{ hashFiles('build.gradle', 'app/build.gradle') }} + - name: Run Detekt run: ./gradlew app:detekt vgsshow:detekt --continue --parallel From d2a216bde7085cfdaddf66cde627abfacad0f4f7 Mon Sep 17 00:00:00 2001 From: "dmytro.dmytryshyn" Date: Mon, 22 Dec 2025 16:38:40 +0200 Subject: [PATCH 05/20] Upload & publish test results --- .github/workflows/ci.yaml | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 7561b8ba..06249d4b 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -49,4 +49,22 @@ jobs: run: ./gradlew app:detekt vgsshow:detekt --continue --parallel - name: Run Unit Tests - run: ./gradlew testDebugUnitTest --continue --stacktrace \ No newline at end of file + run: ./gradlew testDebugUnitTest --continue --stacktrace + + - name: Upload Test Results + uses: actions/upload-artifact@v4 + if: ${{ !cancelled() }} + with: + name: unit-test-results + path: | + **/build/test-results/**/*.xml + **/build/reports/** + retention-days: 30 + + - name: Publish Test Report + uses: mikepenz/action-junit-report@v4 + if: ${{ !cancelled() }} + with: + report_paths: '**/build/test-results/**/TEST-*.xml' + check_name: 'Unit Test Results' + fail_on_failure: true \ No newline at end of file From 20b5dfe95da55bb8f4a34b59cfeed4ef4477c8e7 Mon Sep 17 00:00:00 2001 From: "dmytro.dmytryshyn" Date: Mon, 22 Dec 2025 16:41:17 +0200 Subject: [PATCH 06/20] Update detekt step config --- .github/workflows/ci.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 06249d4b..6e4e8d0c 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -46,7 +46,7 @@ jobs: key: gradle-${{ hashFiles('build.gradle', 'app/build.gradle') }} - name: Run Detekt - run: ./gradlew app:detekt vgsshow:detekt --continue --parallel + run: ./gradlew app:detekt vgsshow:detekt --continue --no-daemon --parallel --configure-on-demand - name: Run Unit Tests run: ./gradlew testDebugUnitTest --continue --stacktrace From 9680207f53738132301e472a50508f5191910b7b Mon Sep 17 00:00:00 2001 From: "dmytro.dmytryshyn" Date: Mon, 22 Dec 2025 16:57:06 +0200 Subject: [PATCH 07/20] Start deamon manually --- .github/workflows/ci.yaml | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 6e4e8d0c..5482f010 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -39,17 +39,14 @@ jobs: - name: Setup Gradle uses: gradle/actions/setup-gradle@v5 - - name: Restore Gradle cache - uses: actions/cache@v3 - with: - path: ~/.gradle - key: gradle-${{ hashFiles('build.gradle', 'app/build.gradle') }} + - name: Start Gradle Daemon + run: ./gradlew --daemon --quiet help & - name: Run Detekt - run: ./gradlew app:detekt vgsshow:detekt --continue --no-daemon --parallel --configure-on-demand + run: ./gradlew app:detekt vgsshow:detekt --continue --parallel - name: Run Unit Tests - run: ./gradlew testDebugUnitTest --continue --stacktrace + run: ./gradlew testDebugUnitTest --continue - name: Upload Test Results uses: actions/upload-artifact@v4 From ef88cca7a3e6683aedae921188ca632516051287 Mon Sep 17 00:00:00 2001 From: "dmytro.dmytryshyn" Date: Mon, 22 Dec 2025 16:58:36 +0200 Subject: [PATCH 08/20] Update demon step --- .github/workflows/ci.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 5482f010..0c4667ca 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -40,7 +40,7 @@ jobs: uses: gradle/actions/setup-gradle@v5 - name: Start Gradle Daemon - run: ./gradlew --daemon --quiet help & + run: ./gradlew --daemon --quiet - name: Run Detekt run: ./gradlew app:detekt vgsshow:detekt --continue --parallel From f95acc09349966e786259a659a4e90f82c4b9f62 Mon Sep 17 00:00:00 2001 From: "dmytro.dmytryshyn" Date: Mon, 22 Dec 2025 17:08:37 +0200 Subject: [PATCH 09/20] Update config --- .github/workflows/ci.yaml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 0c4667ca..39a5779b 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -11,6 +11,10 @@ on: tags: - 'v*' +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + permissions: contents: read checks: write # For publishing test results From 5d37ac78389097345a0c14b7ab0934fe571c5ccd Mon Sep 17 00:00:00 2001 From: "dmytro.dmytryshyn" Date: Mon, 22 Dec 2025 17:18:36 +0200 Subject: [PATCH 10/20] Update unit tests config --- .github/workflows/ci.yaml | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 39a5779b..6f47f3a7 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -43,14 +43,11 @@ jobs: - name: Setup Gradle uses: gradle/actions/setup-gradle@v5 - - name: Start Gradle Daemon - run: ./gradlew --daemon --quiet - - name: Run Detekt - run: ./gradlew app:detekt vgsshow:detekt --continue --parallel + run: ./gradlew vgsshow:detekt --continue - name: Run Unit Tests - run: ./gradlew testDebugUnitTest --continue + run: ./gradlew vgsshow:testDebugUnitTest --continue - name: Upload Test Results uses: actions/upload-artifact@v4 From 7849a32502bda3423fdecebd6b9495a4c42023d3 Mon Sep 17 00:00:00 2001 From: "dmytro.dmytryshyn" Date: Mon, 22 Dec 2025 17:38:28 +0200 Subject: [PATCH 11/20] Add setup local variables step --- .github/workflows/ci.yaml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 6f47f3a7..2d082275 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -31,6 +31,9 @@ jobs: with: submodules: true + - name: Setup local variables + run: echo "VGS_VAULT_ID=$VGS_VAULT_ID" >> local.properties + - name: Set up JDK 17 uses: actions/setup-java@v5 with: From 4ca599ab0a53d87fcc88e245f6ad54df70705911 Mon Sep 17 00:00:00 2001 From: "dmytro.dmytryshyn" Date: Mon, 29 Dec 2025 16:04:02 +0200 Subject: [PATCH 12/20] Complete Unit tests. Implement UI tests --- .github/workflows/ci.yaml | 75 ++++++++++++++++++++++++++++++--------- 1 file changed, 59 insertions(+), 16 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 2d082275..3b766178 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -1,5 +1,5 @@ --- -name: 'CI: Tests' +name: 'CI' on: pull_request: @@ -31,20 +31,10 @@ jobs: with: submodules: true - - name: Setup local variables - run: echo "VGS_VAULT_ID=$VGS_VAULT_ID" >> local.properties - - - name: Set up JDK 17 - uses: actions/setup-java@v5 - with: - distribution: 'temurin' - java-version: '17' - - - name: Setup Android SDK - uses: android-actions/setup-android@v3 - - - name: Setup Gradle - uses: gradle/actions/setup-gradle@v5 + - name: Setup environment + uses: ./.github/actions/setup + env: + VGS_VAULT_ID: ${{ secrets.VGS_VAULT_ID }} - name: Run Detekt run: ./gradlew vgsshow:detekt --continue @@ -52,6 +42,23 @@ jobs: - name: Run Unit Tests run: ./gradlew vgsshow:testDebugUnitTest --continue + - name: (Compass) Generate Code Coverage Report + if: github.ref == 'refs/heads/main' + run: ./gradlew vgsshow:koverHtmlReportDebug + + - name: (Compass) Extract Code Coverage + if: github.ref == 'refs/heads/main' + run: | + COVERAGE=$(sed -n '51p' vgsshow/build/reports/kover/htmlDebug/index.html) + METRIC_VALUE=`echo ${COVERAGE//[[:space:]]/} | sed 's/.$//'` + + echo "metric_value=$METRIC_VALUE" >> $GITHUB_OUTPUT + + - name: (Compass) Publish code coverage + if: github.ref == 'refs/heads/main' + run: | + echo "Implement" + - name: Upload Test Results uses: actions/upload-artifact@v4 if: ${{ !cancelled() }} @@ -68,4 +75,40 @@ jobs: with: report_paths: '**/build/test-results/**/TEST-*.xml' check_name: 'Unit Test Results' - fail_on_failure: true \ No newline at end of file + fail_on_failure: true + + run-ui-tests: + name: 'Run UI Tests' + runs-on: macos-14 # macOS M1 runner + if: ${{ startsWith(github.head_ref, 'release/') }} # Change to release + + steps: + - name: Checkout code + uses: actions/checkout@v6 + with: + submodules: true + + - name: Setup environment + uses: ./.github/actions/setup + env: + VGS_VAULT_ID: ${{ secrets.VGS_VAULT_ID }} + + - name: Auth Google Cloud SDK + uses: google-github-actions/auth@v2 + with: + credentials_json: ${{ secrets.GOOGLE_SERVICE_ACCOUNT_KEY }} + + - name: Set up Google Cloud SDK + uses: google-github-actions/setup-gcloud@v3 + + - name: Assemble debug & test APK + run: ./gradlew assembleDebug assembleAndroidTest + + - name: Run UI tests + run: | + gcloud firebase test android run \ + --type instrumentation \ + --app app/build/outputs/apk/debug/app-debug.apk \ + --test app/build/outputs/apk/androidTest/debug/app-debug-androidTest.apk \ + --device model=oriole,version=31,locale=en,orientation=portrait \ + --device model=blazer,version=36,locale=en,orientation=portrait \ No newline at end of file From ff29f722f87b5a5a69e3bb3550c75c0265099b89 Mon Sep 17 00:00:00 2001 From: "dmytro.dmytryshyn" Date: Mon, 29 Dec 2025 16:43:28 +0200 Subject: [PATCH 13/20] Add setup action --- .github/actions/setup/action.yaml | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 .github/actions/setup/action.yaml diff --git a/.github/actions/setup/action.yaml b/.github/actions/setup/action.yaml new file mode 100644 index 00000000..68582aad --- /dev/null +++ b/.github/actions/setup/action.yaml @@ -0,0 +1,24 @@ +runs: + using: composite + steps: + - name: Setup JDK 17 + uses: actions/setup-java@v5 + with: + distribution: temurin + java-version: 17 + + - name: Setup Android SDK + uses: android-actions/setup-android@v3 + + - name: Cache Gradle + uses: actions/cache@v3 + with: + path: | + ~/.gradle/caches + ~/.gradle/wrapper/dists + key: gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }} + restore-keys: gradle- + + - name: Setup local variables + shell: bash + run: echo "VGS_VAULT_ID=$VGS_VAULT_ID" >> local.properties \ No newline at end of file From 41447b0277fe840920a525a31fcfabcaa4245770 Mon Sep 17 00:00:00 2001 From: "dmytro.dmytryshyn" Date: Mon, 29 Dec 2025 17:26:12 +0200 Subject: [PATCH 14/20] Remove circle ci config yaml --- .circleci/config.yml | 170 ------------------------------------------- 1 file changed, 170 deletions(-) delete mode 100644 .circleci/config.yml diff --git a/.circleci/config.yml b/.circleci/config.yml deleted file mode 100644 index 13d72950..00000000 --- a/.circleci/config.yml +++ /dev/null @@ -1,170 +0,0 @@ -#file: noinspection YAMLSchemaValidation -version: 2.1 - -aliases: - - &environment - working_directory: ~/code - docker: - - image: cimg/android:2024.01 - resource_class: large - -# === Scheduled Pipeline Parameters === -parameters: - nightly-security-scan: - type: boolean - default: false - -jobs: - run-unit-test-and-build: - <<: *environment - steps: - - checkout - - run: - name: Fetch analytics submodule - command: git submodule init && git submodule update - - run: - name: Setup local variables - command: echo "VGS_VAULT_ID=$VGS_VAULT_ID" >> local.properties - - restore_cache: - key: jars-{{ checksum "build.gradle" }}-{{ checksum "app/build.gradle" }} - - run: - name: Download Dependencies - command: | - sudo chmod +x gradlew - ./gradlew androidDependencies - - save_cache: - paths: - - ~/.gradle - key: jars-{{ checksum "build.gradle" }}-{{ checksum "app/build.gradle" }} - - run: - name: Run Detekt - command: ./gradlew app:detekt vgsshow:detekt --continue --parallel - - run: - name: Run Unit tests - command: ./gradlew testDebugUnitTest - - run: - name: Generate Code Coverage Report - command: | - if [ "<< pipeline.git.branch >>" == "main" ]; then - ./gradlew koverHtmlReportDebug - else - echo "Code coverage will only be generated on the main branch." - fi - - run: - name: Publish Code Coverage Report - command: | - if [ "<< pipeline.git.branch >>" == "main" ]; then - COVERAGE=$(sed -n '51p' vgsshow/build/reports/kover/htmlDebug/index.html) - METRIC_VALUE=`echo ${COVERAGE//[[:space:]]/} | sed 's/.$//'` - - echo "$METRIC_VALUE" - - curl --fail-with-body \ - --request POST \ - --url https://verygoodsecurity.atlassian.net/gateway/api/compass/v1/metrics \ - --user "$COMPASS_USER_EMAIL:$COMPASS_API_KEY" \ - --header "Accept: application/json" \ - --header "Content-Type: application/json" \ - --data "{\"metricSourceId\":\"$COMPASS_METRIC_SOURCE_ID\",\"value\":\"$METRIC_VALUE\",\"timestamp\":\"$(date -u +'%Y-%m-%dT%H:%M:%SZ')\"}" - else - echo "Code coverage will only be pushed to compass on the main branch." - fi - - run: - name: Generate apk - command: ./gradlew assembleDebug assembleAndroidTest - - persist_to_workspace: - root: ~/code - paths: - - app - run-ui-test: - <<: *environment - steps: - - attach_workspace: - at: ~/code - - run: - name: Check if release branch - command: | - if [[ "<< pipeline.git.branch >>" != *"release"* ]]; then - echo "UI tests should be running only on release branch!" - circleci-agent step halt - fi - - run: - name: Store Google Service Account - command: echo $GCLOUD_SERVICE_KEY | base64 -di > ${HOME}/gcloud-service-key.json - - run: - name: Authorize gcloud and set config defaults - command: | - sudo gcloud auth activate-service-account --key-file=${HOME}/gcloud-service-key.json - sudo gcloud --quiet config set project ${GOOGLE_PROJECT_ID} - - run: - name: Test with Firebase Test Lab - command: > - sudo gcloud firebase test android run \ - --app app/build/outputs/apk/debug/app-debug.apk \ - --test app/build/outputs/apk/androidTest/debug/app-debug-androidTest.apk \ - --device model=caiman,version=35,locale=en,orientation=portrait \ - --device model=bluejay,version=32,locale=en,orientation=portrait \ - scan-sast-pr: - parameters: - default_branch: - type: string - default: main - environment: - SEMGREP_REPO_URL: << pipeline.project.git_url >> - SEMGREP_BRANCH: << pipeline.git.branch >> - SEMGREP_BASELINE_REF: << parameters.default_branch >> - docker: - - image: returntocorp/semgrep - resource_class: large - steps: - - checkout - - run: - name: "Semgrep diff scan" - command: semgrep ci - - scan-sast-full: - parameters: - default_branch: - type: string - default: main - environment: - SEMGREP_REPO_URL: << pipeline.project.git_url >> - SEMGREP_BRANCH: << pipeline.git.branch >> - docker: - - image: returntocorp/semgrep - resource_class: large - steps: - - checkout - - run: - name: "Semgrep full scan" - command: semgrep ci -workflows: - main: - when: - not: << pipeline.parameters.nightly-security-scan >> - jobs: - - scan-sast-pr: - context: - - security-tools - - circleci - - scan-sast-full: - filters: - # ignore any commit on any branch by default - branches: - ignore: /.*/ - tags: - only: /^v\d+\.\d+\.\d+(?:-\w+){0,1}$/ - - run-unit-test-and-build: - context: - - frontend-deploy - - run-ui-test: - requires: - - run-unit-test-and-build - - scheduled-security-scan: - when: << pipeline.parameters.nightly-security-scan >> - jobs: - - scan-sast-full: - context: - - security-tools - - circleci \ No newline at end of file From e64c9e8e695a14f0af4e680032488fa4b0fd6668 Mon Sep 17 00:00:00 2001 From: "dmytro.dmytryshyn" Date: Mon, 29 Dec 2025 17:33:35 +0200 Subject: [PATCH 15/20] Implement Publish code coverage step --- .github/workflows/ci.yaml | 24 ++++++++++++++---------- 1 file changed, 14 insertions(+), 10 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 3b766178..980e7689 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -36,18 +36,19 @@ jobs: env: VGS_VAULT_ID: ${{ secrets.VGS_VAULT_ID }} - - name: Run Detekt - run: ./gradlew vgsshow:detekt --continue - - - name: Run Unit Tests - run: ./gradlew vgsshow:testDebugUnitTest --continue +# - name: Run Detekt +# run: ./gradlew vgsshow:detekt --continue +# +# - name: Run Unit Tests +# run: ./gradlew vgsshow:testDebugUnitTest --continue - name: (Compass) Generate Code Coverage Report - if: github.ref == 'refs/heads/main' +# if: github.ref == 'refs/heads/main' run: ./gradlew vgsshow:koverHtmlReportDebug - name: (Compass) Extract Code Coverage - if: github.ref == 'refs/heads/main' + id: coverage +# if: github.ref == 'refs/heads/main' run: | COVERAGE=$(sed -n '51p' vgsshow/build/reports/kover/htmlDebug/index.html) METRIC_VALUE=`echo ${COVERAGE//[[:space:]]/} | sed 's/.$//'` @@ -55,9 +56,12 @@ jobs: echo "metric_value=$METRIC_VALUE" >> $GITHUB_OUTPUT - name: (Compass) Publish code coverage - if: github.ref == 'refs/heads/main' - run: | - echo "Implement" +# if: github.ref == 'refs/heads/main' + uses: verygood-ops/cicd-shared/.github/actions/compass@compass-action-v1.0.0 + with: + metric_source_id: 'ari:cloud:compass:83673fa7-fd28-4f4a-9738-f584064570a7:component/db43f86d-85fe-42e1-954d-457f5a4082b8/444114a1-5d6c-4c2e-96c6-5895cd094e6a' + metric_value: ${{ steps.coverage.outputs.metric_value }} + api_key: ${{ secrets.COMPASS_API_KEY }} - name: Upload Test Results uses: actions/upload-artifact@v4 From 203113286b714481f0c11877d62177194ae2a2d6 Mon Sep 17 00:00:00 2001 From: "dmytro.dmytryshyn" Date: Mon, 29 Dec 2025 17:39:43 +0200 Subject: [PATCH 16/20] Revert debug changes --- .github/workflows/ci.yaml | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 980e7689..081b2c9c 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -36,19 +36,19 @@ jobs: env: VGS_VAULT_ID: ${{ secrets.VGS_VAULT_ID }} -# - name: Run Detekt -# run: ./gradlew vgsshow:detekt --continue -# -# - name: Run Unit Tests -# run: ./gradlew vgsshow:testDebugUnitTest --continue + - name: Run Detekt + run: ./gradlew vgsshow:detekt --continue + + - name: Run Unit Tests + run: ./gradlew vgsshow:testDebugUnitTest --continue - name: (Compass) Generate Code Coverage Report -# if: github.ref == 'refs/heads/main' + if: github.ref == 'refs/heads/main' run: ./gradlew vgsshow:koverHtmlReportDebug - name: (Compass) Extract Code Coverage id: coverage -# if: github.ref == 'refs/heads/main' + if: github.ref == 'refs/heads/main' run: | COVERAGE=$(sed -n '51p' vgsshow/build/reports/kover/htmlDebug/index.html) METRIC_VALUE=`echo ${COVERAGE//[[:space:]]/} | sed 's/.$//'` @@ -56,7 +56,7 @@ jobs: echo "metric_value=$METRIC_VALUE" >> $GITHUB_OUTPUT - name: (Compass) Publish code coverage -# if: github.ref == 'refs/heads/main' + if: github.ref == 'refs/heads/main' uses: verygood-ops/cicd-shared/.github/actions/compass@compass-action-v1.0.0 with: metric_source_id: 'ari:cloud:compass:83673fa7-fd28-4f4a-9738-f584064570a7:component/db43f86d-85fe-42e1-954d-457f5a4082b8/444114a1-5d6c-4c2e-96c6-5895cd094e6a' From 0f87d24ad6077ab7d23dcef5c907a5453c8999a0 Mon Sep 17 00:00:00 2001 From: "dmytro.dmytryshyn" Date: Mon, 29 Dec 2025 17:42:45 +0200 Subject: [PATCH 17/20] Comment Publish code coverage step --- .github/workflows/ci.yaml | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 081b2c9c..9005f838 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -55,13 +55,13 @@ jobs: echo "metric_value=$METRIC_VALUE" >> $GITHUB_OUTPUT - - name: (Compass) Publish code coverage - if: github.ref == 'refs/heads/main' - uses: verygood-ops/cicd-shared/.github/actions/compass@compass-action-v1.0.0 - with: - metric_source_id: 'ari:cloud:compass:83673fa7-fd28-4f4a-9738-f584064570a7:component/db43f86d-85fe-42e1-954d-457f5a4082b8/444114a1-5d6c-4c2e-96c6-5895cd094e6a' - metric_value: ${{ steps.coverage.outputs.metric_value }} - api_key: ${{ secrets.COMPASS_API_KEY }} +# - name: (Compass) Publish code coverage +# if: github.ref == 'refs/heads/main' +# uses: verygood-ops/cicd-shared/.github/actions/compass@compass-action-v1.0.0 +# with: +# metric_source_id: 'ari:cloud:compass:83673fa7-fd28-4f4a-9738-f584064570a7:component/db43f86d-85fe-42e1-954d-457f5a4082b8/444114a1-5d6c-4c2e-96c6-5895cd094e6a' +# metric_value: ${{ steps.coverage.outputs.metric_value }} +# api_key: ${{ secrets.COMPASS_API_KEY }} - name: Upload Test Results uses: actions/upload-artifact@v4 From b139325a93e6e2015d2aa865b13f16bd28c58042 Mon Sep 17 00:00:00 2001 From: "dmytro.dmytryshyn" Date: Mon, 29 Dec 2025 17:43:27 +0200 Subject: [PATCH 18/20] Remove redundant comments --- .github/workflows/ci.yaml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 9005f838..c8fbd937 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -22,7 +22,7 @@ permissions: jobs: run-unit-tests: name: 'Run Unit Tests' - runs-on: macos-14 # macOS M1 runner + runs-on: macos-14 timeout-minutes: 10 steps: @@ -83,8 +83,8 @@ jobs: run-ui-tests: name: 'Run UI Tests' - runs-on: macos-14 # macOS M1 runner - if: ${{ startsWith(github.head_ref, 'release/') }} # Change to release + runs-on: macos-14 + if: ${{ startsWith(github.head_ref, 'release/') }} steps: - name: Checkout code From 7c964760be0511ab2189364cd9b4d190747a4ae9 Mon Sep 17 00:00:00 2001 From: "dmytro.dmytryshyn" Date: Tue, 30 Dec 2025 13:46:38 +0200 Subject: [PATCH 19/20] Update runs on --- .github/workflows/ci.yaml | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index c8fbd937..bdaf3495 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -3,8 +3,6 @@ name: 'CI' on: pull_request: - branches: - - '**' push: branches: - 'main' @@ -22,7 +20,7 @@ permissions: jobs: run-unit-tests: name: 'Run Unit Tests' - runs-on: macos-14 + runs-on: ubuntu-latest timeout-minutes: 10 steps: @@ -83,7 +81,7 @@ jobs: run-ui-tests: name: 'Run UI Tests' - runs-on: macos-14 + runs-on: ubuntu-latest if: ${{ startsWith(github.head_ref, 'release/') }} steps: From d0c5eff8590a1f484475eb2808e1e010940d6632 Mon Sep 17 00:00:00 2001 From: "dmytro.dmytryshyn" Date: Tue, 30 Dec 2025 13:55:53 +0200 Subject: [PATCH 20/20] Update compass code coverage steps --- .github/workflows/ci.yaml | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index bdaf3495..6fd45fed 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -41,13 +41,11 @@ jobs: run: ./gradlew vgsshow:testDebugUnitTest --continue - name: (Compass) Generate Code Coverage Report - if: github.ref == 'refs/heads/main' - run: ./gradlew vgsshow:koverHtmlReportDebug - - - name: (Compass) Extract Code Coverage id: coverage if: github.ref == 'refs/heads/main' run: | + ./gradlew vgsshow:koverHtmlReportDebug + COVERAGE=$(sed -n '51p' vgsshow/build/reports/kover/htmlDebug/index.html) METRIC_VALUE=`echo ${COVERAGE//[[:space:]]/} | sed 's/.$//'`