From 70b209e0dd27f8e5767d5766175ebc4380bc85d1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?JUAN=20CASTA=C3=91EDA?= Date: Thu, 31 Aug 2023 16:17:53 +0200 Subject: [PATCH] Fixed tests --- .github/workflows/ci_cd.yml | 5 +++-- lib/src/test/java/com/jimdo/jcountry/JCountryTest.java | 6 ++++-- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/.github/workflows/ci_cd.yml b/.github/workflows/ci_cd.yml index 94cc3fa..9467b55 100644 --- a/.github/workflows/ci_cd.yml +++ b/.github/workflows/ci_cd.yml @@ -28,12 +28,13 @@ jobs: cache: 'gradle' - name: Run tests - run: ./gradlew check + run: ./gradlew build && ./gradlew check release_and_publish: name: Release and Publish runs-on: ubuntu-latest - + needs: + - test steps: - name: Checkout Repository uses: actions/checkout@v3 diff --git a/lib/src/test/java/com/jimdo/jcountry/JCountryTest.java b/lib/src/test/java/com/jimdo/jcountry/JCountryTest.java index 2480814..74b05ba 100644 --- a/lib/src/test/java/com/jimdo/jcountry/JCountryTest.java +++ b/lib/src/test/java/com/jimdo/jcountry/JCountryTest.java @@ -54,11 +54,12 @@ void testJCountryReadTranslations() { @Test void testJCountryReadsTranslations() { // More than 50% of work population is covered with these languages. - ArrayList languages = new ArrayList<>(Arrays.asList("zh_CN", "zh_HK", "zh_TW", "es", "de", "bn", "bn_IN", "pt", "pt_BR", "ru", "ja", "hi", "ar", "pa", "fr", "tr", "ko")); + ArrayList languages = new ArrayList<>(Arrays.asList("nl", "es", "de", "bn", "pt", "ru", "ja", "hi", "ar", "pa", "fr", "tr", "ko")); CountryDB countryDB = new CountryDBImpl(true); languages.forEach( it -> { Optional bundle = countryDB.getCountriesTranslations(new Locale(it)); + System.out.println(it); assertTrue(!bundle.isEmpty()); }); } @@ -109,11 +110,12 @@ void testJCountryLanguagesDBReadTranslations() { @Test void testJCountryLanguagesReadsTranslations() { // More than 50% of work population is covered with these languages. - ArrayList languages = new ArrayList<>(Arrays.asList("zh_CN", "zh_HK", "zh_TW", "es", "de", "bn", "pt", "pt_BR", "ru", "ja", "hi", "ar", "pa", "fr", "tr", "ko")); + ArrayList languages = new ArrayList<>(Arrays.asList("es", "de", "it", "ja", "hi", "ar", "pa", "fr", "tr", "nl")); LanguageDB languageDB = new LanguageDBImpl(true); languages.forEach( it -> { Optional bundle = languageDB.getLanguagesTranslations(new Locale(it)); + System.out.println(it); assertTrue(!bundle.isEmpty(), it + " translation"); }); }