diff --git a/.github/workflows/ci_cd.yml b/.github/workflows/ci_cd.yml index f643f3409a..e67e16f64c 100644 --- a/.github/workflows/ci_cd.yml +++ b/.github/workflows/ci_cd.yml @@ -264,7 +264,7 @@ jobs: - name: Check UI dependencies if: steps.ui-files-changed.outputs.any_modified == 'true' && steps.is_core_repo.outputs.value == 'true' - run: npx knip@5.88.0 -c ui/knip.jsonc + run: yarn knip - name: Check deployment build.gradle id: check_deployment_gradle @@ -466,16 +466,16 @@ jobs: - name: Define backend test command id: test-backend-command if: ${{ steps.skip-backend-tests.outputs.value != 'true' }} - run: echo "value=./gradlew test -x npmTest" >> $GITHUB_OUTPUT + run: echo "value=./gradlew testBackend" >> $GITHUB_OUTPUT - name: Define UI component test command id: test-ui-components-command if: ${{ steps.skip-ui-component-tests.outputs.value != 'true' }} - run: echo "value=./gradlew -p ui/component npmTest" >> $GITHUB_OUTPUT + run: echo "value=./gradlew testUiComponent -PreuseUiTestArtifacts=true" >> $GITHUB_OUTPUT - name: Define UI app test command id: test-ui-apps-command - run: echo "value=./gradlew -p ui/app npmTest" >> $GITHUB_OUTPUT + run: echo "value=./gradlew testUiApp -PreuseUiTestArtifacts=true" >> $GITHUB_OUTPUT - name: Define manager docker build command id: manager-docker-command @@ -703,20 +703,7 @@ jobs: - name: Check for outdated translations if: steps.is_core_repo.outputs.value == 'true' - run: | - set -e - - # Run the tests - ./gradlew -p ui/app/shared processTranslations --no-parallel - - out=$(git status --porcelain | grep "ui/app/shared/locales" || true) - if [[ -z "$out" ]]; then - echo "✅ No pipeline changes detected." - else - echo "❌ Pipeline files have changed. Please run './gradlew -p ui/app/shared processTranslations --no-parallel'" - echo "$out" - exit 1 - fi + run: ./gradlew :ui:app:shared:checkTranslations --no-parallel timeout-minutes: 20 - name: Run backend tests diff --git a/.github/workflows/integration-tests.yml b/.github/workflows/integration-tests.yml index 69e479a40f..90bd4692c3 100644 --- a/.github/workflows/integration-tests.yml +++ b/.github/workflows/integration-tests.yml @@ -33,7 +33,7 @@ jobs: docker compose -f profile/dev-testing.yml up -d --no-build # Run the tests - ./gradlew :test:test + ./gradlew testBackendIntegration - name: Archive integration test results if: always() uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # v7.0.2 diff --git a/.github/workflows/ui-app-tests.yml b/.github/workflows/ui-app-tests.yml index f8d881bac6..ce9e230247 100644 --- a/.github/workflows/ui-app-tests.yml +++ b/.github/workflows/ui-app-tests.yml @@ -50,7 +50,7 @@ jobs: docker compose -f profile/dev-testing.yml up -d --no-build # Run the tests - ./gradlew -p ui/app npmTest -Pargs="--shard=${{ matrix.shardIndex }}/${{ matrix.shardCount }}" + ./gradlew testUiApp -PreuseUiTestArtifacts=true -Pargs="--shard=${{ matrix.shardIndex }}/${{ matrix.shardCount }}" - name: Archive UI app test results if: always() uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # v7.0.2 diff --git a/.github/workflows/ui-check-outdated-translations.yml b/.github/workflows/ui-check-outdated-translations.yml index 707cbd7c15..77dfcefd3b 100644 --- a/.github/workflows/ui-check-outdated-translations.yml +++ b/.github/workflows/ui-check-outdated-translations.yml @@ -22,18 +22,4 @@ jobs: cache: "gradle" - name: Check for outdated translations timeout-minutes: 20 - run: | - # Check Outdated Translations - ./gradlew -p ui/app/shared processTranslations --no-parallel - - out=$(git status --porcelain | grep "ui/app/shared/locales" || true) - if [[ -z "$out" ]]; then - echo "✅ No pipeline changes detected." - else - echo "❌ Pipeline files have changed. Please run: - \`\`\`sh - ./gradlew -p ui/app/shared processTranslations --no-parallel - \`\`\` - $out" >> $GITHUB_STEP_SUMMARY - exit 1 - fi + run: ./gradlew :ui:app:shared:checkTranslations --no-parallel diff --git a/.github/workflows/ui-component-tests.yml b/.github/workflows/ui-component-tests.yml index cde125f987..825dd8b9ff 100644 --- a/.github/workflows/ui-component-tests.yml +++ b/.github/workflows/ui-component-tests.yml @@ -40,7 +40,7 @@ jobs: run: find . -name "*.tsbuildinfo" -exec touch {} + - name: Run UI component tests timeout-minutes: 20 - run: ./gradlew -p ui/component npmTest + run: ./gradlew testUiComponent -PreuseUiTestArtifacts=true - name: Archive UI component test results if: always() uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # v7.0.2 diff --git a/.github/workflows/unit-tests.yml b/.github/workflows/unit-tests.yml index 864344517e..f62e976632 100644 --- a/.github/workflows/unit-tests.yml +++ b/.github/workflows/unit-tests.yml @@ -22,18 +22,9 @@ jobs: java-version: "21" cache: "gradle" - - name: Check if core repo - id: is_core_repo - uses: openremote/core/.github/actions/check-if-core-repo@357f1387fbc99e7a59752a62064f0bdade57612d - - name: Run unit tests timeout-minutes: 20 - run: | - if [ "${{ steps.is_core_repo.outputs.value }}" = "true" ]; then - ./gradlew test -x :test:test -x npmTest unitTestReport - else - ./gradlew test -x :test:test - fi + run: ./gradlew testBackendUnit unitTestReport - name: Archive unit test results if: always() diff --git a/AGENTS.md b/AGENTS.md index 6ac738d51f..971327da59 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -8,7 +8,15 @@ When naming scripts, use \_\