Skip to content

Commit

Permalink
Merge pull request #97 from UweTrottmann/update-tests
Browse files Browse the repository at this point in the history
Update CI and fix tests
  • Loading branch information
UweTrottmann authored Jun 7, 2024
2 parents ae01942 + cbede87 commit 568ba5c
Show file tree
Hide file tree
Showing 6 changed files with 235 additions and 123 deletions.
9 changes: 9 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# Please see the documentation for all configuration options:
# https://docs.github.com/github/administering-a-repository/configuration-options-for-dependency-updates

version: 2
updates:
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "weekly"
22 changes: 17 additions & 5 deletions .github/workflows/build-and-test.yml
Original file line number Diff line number Diff line change
@@ -1,23 +1,35 @@
# https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions
name: Build and test

on: [push, pull_request]
on:
push:
pull_request:
workflow_dispatch: # Allow running manually from web UI

jobs:
package:
name: Maven Build and Test
runs-on: ubuntu-latest
# Only run on pushes or if pull request from fork
if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name != github.event.pull_request.base.repo.full_name
permissions:
checks: write # to publish unit test results

steps:
- uses: actions/checkout@v3
- uses: actions/setup-java@v3
- name: Check out
uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4.1.6
- name: Set up JDK 17
uses: actions/setup-java@99b8673ff64fbf99d8d325f52d9a5bdedb8483e9 # v4.2.1
with:
distribution: 'temurin'
java-version: '17'
cache: 'maven'
- name: Build with Maven
run: mvn --batch-mode -show-version --update-snapshots --errors package
- name: Publish Unit Test Results
uses: EnricoMi/publish-unit-test-result-action@v2
uses: dorny/test-reporter@31a54ee7ebcacc03a09ea97a7e5465a47b84aea5 # v1.9.1
if: always() # also run if build step failed
with:
junit_files: target/surefire-reports/*.xml
name: JUnit Report
path: target/surefire-reports/*.xml
reporter: java-junit
Original file line number Diff line number Diff line change
Expand Up @@ -58,15 +58,146 @@ public void primary_translations() throws IOException {
List<String> languages = call.execute().body();
assertThat(languages).isNotEmpty();
// Assert content to detect languages getting added or removed.
assertThat(languages).hasSize(80);
assertThat(languages).containsExactlyInAnyOrder("af-ZA", "ar-AE", "ar-SA", "be-BY", "bg-BG", "bn-BD", "ca-ES",
"ch-GU", "cn-CN", "cs-CZ", "cy-GB", "da-DK", "de-AT", "de-CH", "de-DE", "el-GR", "en-AU", "en-CA",
"en-GB", "en-IE", "en-NZ", "en-US", "eo-EO", "es-ES", "es-MX", "et-EE", "eu-ES", "fa-IR", "fi-FI",
"fr-CA", "fr-FR", "ga-IE", "gd-GB", "gl-ES", "he-IL", "hi-IN", "hr-HR", "hu-HU", "id-ID", "it-IT",
"ja-JP", "ka-GE", "kk-KZ", "kn-IN", "ko-KR", "ky-KG", "lt-LT", "lv-LV", "ml-IN", "mr-IN", "ms-MY",
"ms-SG", "nb-NO", "nl-BE", "nl-NL", "no-NO", "pa-IN", "pl-PL", "pt-BR", "pt-PT", "ro-RO", "ru-RU",
"si-LK", "sk-SK", "sl-SI", "sq-AL", "sr-RS", "sv-SE", "ta-IN", "te-IN", "th-TH", "tl-PH", "tr-TR",
"uk-UA", "vi-VN", "zh-CN", "zh-HK", "zh-SG", "zh-TW", "zu-ZA");
assertThat(languages).hasSize(137);
assertThat(languages).containsExactlyInAnyOrder(
"af-ZA",
"ar-AE",
"ar-BH",
"ar-EG",
"ar-IQ",
"ar-JO",
"ar-LY",
"ar-MA",
"ar-QA",
"ar-SA",
"ar-TD",
"ar-YE",
"be-BY",
"bg-BG",
"bn-BD",
"br-FR",
"ca-AD",
"ca-ES",
"ch-GU",
"cs-CZ",
"cy-GB",
"da-DK",
"de-AT",
"de-CH",
"de-DE",
"el-CY",
"el-GR",
"en-AG",
"en-AU",
"en-BB",
"en-BZ",
"en-CA",
"en-CM",
"en-GB",
"en-GG",
"en-GH",
"en-GI",
"en-GY",
"en-IE",
"en-JM",
"en-KE",
"en-LC",
"en-MW",
"en-NZ",
"en-PG",
"en-TC",
"en-US",
"en-ZM",
"en-ZW",
"eo-EO",
"es-AR",
"es-CL",
"es-DO",
"es-EC",
"es-ES",
"es-GQ",
"es-GT",
"es-HN",
"es-MX",
"es-NI",
"es-PA",
"es-PE",
"es-PY",
"es-SV",
"es-UY",
"et-EE",
"eu-ES",
"fa-IR",
"fi-FI",
"fr-BF",
"fr-CA",
"fr-CD",
"fr-CI",
"fr-FR",
"fr-GF",
"fr-GP",
"fr-MC",
"fr-ML",
"fr-MU",
"fr-PF",
"ga-IE",
"gd-GB",
"gl-ES",
"he-IL",
"hi-IN",
"hr-HR",
"hu-HU",
"id-ID",
"it-IT",
"it-VA",
"ja-JP",
"ka-GE",
"kk-KZ",
"kn-IN",
"ko-KR",
"ky-KG",
"lt-LT",
"lv-LV",
"ml-IN",
"mr-IN",
"ms-MY",
"ms-SG",
"nb-NO",
"nl-BE",
"nl-NL",
"no-NO",
"pa-IN",
"pl-PL",
"pt-AO",
"pt-BR",
"pt-MZ",
"pt-PT",
"ro-MD",
"ro-RO",
"ru-RU",
"si-LK",
"sk-SK",
"sl-SI",
"sq-AL",
"sq-XK",
"sr-ME",
"sr-RS",
"sv-SE",
"sw-TZ",
"ta-IN",
"te-IN",
"th-TH",
"tl-PH",
"tr-TR",
"uk-UA",
"ur-PK",
"vi-VN",
"zh-CN",
"zh-HK",
"zh-SG",
"zh-TW",
"zu-ZA"
);
}

}
Loading

0 comments on commit 568ba5c

Please sign in to comment.