Skip to content

Commit

Permalink
Merge branch 'main' into test-coverage
Browse files Browse the repository at this point in the history
  • Loading branch information
deandreamatias authored Jul 30, 2024
2 parents 5ab5b2a + 995b030 commit 5d2fb2f
Show file tree
Hide file tree
Showing 57 changed files with 1,076 additions and 228 deletions.
96 changes: 73 additions & 23 deletions .github/workflows/base.yaml
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
name: Base
name: CI & CD

on:
workflow_dispatch:

push:
branches: [main]
tags:
- '[0-9]+.[0-9]+.[0-9]+*'
- "[0-9]+.[0-9]+.[0-9]+*"

pull_request:
branches: [main]
Expand All @@ -18,10 +18,14 @@ concurrency:

jobs:
build:
name: Build package & run tests
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 1 # Use shallow clone for faster checkout

- name: Check broken links
uses: JustinBeckwith/linkinator-action@v1
Expand All @@ -32,13 +36,15 @@ jobs:
uses: kuhnroyal/flutter-fvm-config-action@v2
id: fvm-config-action
with:
path: '.fvmrc'
flavor: 'stable'
path: ".fvmrc"
flavor: "stable"

- uses: subosito/flutter-action@v2
- name: Set up Flutter
uses: subosito/flutter-action@v2
with:
flutter-version: ${{ steps.fvm-config-action.outputs.FLUTTER_VERSION }}
channel: ${{ steps.fvm-config-action.outputs.FLUTTER_CHANNEL }}
architecture: x64
cache: true

- name: Install dependencies
Expand All @@ -48,9 +54,8 @@ jobs:
run: flutter gen-l10n

- name: Run l10n on example
run: |
cd example
flutter gen-l10n
run: flutter gen-l10n
working-directory: example

- name: Format code
run: dart format --set-exit-if-changed $(find . -name "*.dart" ! \( -wholename "./lib/localization/intl/*" -or -wholename "./example/lib/localization/intl/*" \))
Expand All @@ -59,16 +64,11 @@ jobs:
run: dart analyze

- name: Run tests
run: flutter test --coverage
run: flutter test --no-pub --coverage

- name: Check publish warnings
run: dart pub publish --dry-run

- name: Build example
run: |
cd example
flutter build appbundle --debug
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v4
env:
Expand All @@ -78,23 +78,74 @@ jobs:
flags: unittests
name: form_builder_validators

example:
name: Build example app
runs-on: ubuntu-latest

steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 1 # Use shallow clone for faster checkout

- name: Get Flutter version by FVM
uses: kuhnroyal/flutter-fvm-config-action@v2
id: fvm-config-action
with:
path: ".fvmrc"
flavor: "stable"

- name: Set up Flutter
uses: subosito/flutter-action@v2
with:
flutter-version: ${{ steps.fvm-config-action.outputs.FLUTTER_VERSION }}
channel: ${{ steps.fvm-config-action.outputs.FLUTTER_CHANNEL }}
architecture: x64
cache: true

- name: Install dependencies
run: dart pub get

- name: Run l10n
run: flutter gen-l10n

- name: Run l10n on example
run: flutter gen-l10n
working-directory: example

- name: Build example
run: flutter build appbundle --debug
working-directory: example

deployment:
if: ${{ github.ref_type == 'tag' }}
needs: build
needs: [build, example]
name: Deploy package
permissions:
id-token: write
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 1 # Use shallow clone for faster checkout

- name: Set up Dart
uses: dart-lang/setup-dart@v1

- uses: dart-lang/setup-dart@v1
- name: Get Flutter version by FVM
uses: kuhnroyal/flutter-fvm-config-action@v2
id: fvm-config-action
with:
path: ".fvmrc"
flavor: "stable"

- name: Flutter action
- name: Set up Flutter
uses: subosito/flutter-action@v2
with:
channel: 'stable'
# use the build-in cache from Subosito
flutter-version: ${{ steps.fvm-config-action.outputs.FLUTTER_VERSION }}
channel: ${{ steps.fvm-config-action.outputs.FLUTTER_CHANNEL }}
architecture: x64
cache: true

- name: Install dependencies
Expand All @@ -105,4 +156,3 @@ jobs:

- name: Publish package
run: dart pub publish -v -f

4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Changelog

## 11.0.1

- Align between validator input types with other validators

## 11.0.0

- Split up validators into smaller pieces
Expand Down
4 changes: 3 additions & 1 deletion lib/l10n/intl_ar.arb
Original file line number Diff line number Diff line change
Expand Up @@ -84,5 +84,7 @@
"dunsErrorText": "يجب أن تكون القيمة رقم DUNS صالح.",
"licensePlateErrorText": "يجب أن تكون القيمة لوحة ترخيص صالحة.",
"vinErrorText": "يجب أن تكون القيمة رقم VIN صالح.",
"languageCodeErrorText": "يجب أن تكون القيمة رمز لغة صالح."
"languageCodeErrorText": "يجب أن تكون القيمة رمز لغة صالح.",
"floatErrorText": "يجب أن تكون القيمة رقم عشري صالح.",
"hexadecimalErrorText": "يجب أن تكون القيمة رقم سداسي عشري صالح."
}
4 changes: 3 additions & 1 deletion lib/l10n/intl_bg.arb
Original file line number Diff line number Diff line change
Expand Up @@ -84,5 +84,7 @@
"dunsErrorText": "Стойността трябва да бъде валиден DUNS номер.",
"licensePlateErrorText": "Стойността трябва да бъде валиден регистрационен номер.",
"vinErrorText": "Стойността трябва да бъде валиден VIN.",
"languageCodeErrorText": "Стойността трябва да бъде валиден езиков код."
"languageCodeErrorText": "Стойността трябва да бъде валиден езиков код.",
"floatErrorText": "Стойността трябва да бъде валидно число с плаваща запетая.",
"hexadecimalErrorText": "Стойността трябва да бъде валиден шестнадесетичен номер."
}
4 changes: 3 additions & 1 deletion lib/l10n/intl_bn.arb
Original file line number Diff line number Diff line change
Expand Up @@ -84,5 +84,7 @@
"dunsErrorText": "মানটি একটি বৈধ DUNS নম্বর হতে হবে।",
"licensePlateErrorText": "মানটি একটি বৈধ লাইসেন্স প্লেট হতে হবে।",
"vinErrorText": "মানটি একটি বৈধ VIN হতে হবে।",
"languageCodeErrorText": "মানটি একটি বৈধ ভাষা কোড হতে হবে।"
"languageCodeErrorText": "মানটি একটি বৈধ ভাষা কোড হতে হবে।",
"floatErrorText": "মান একটি বৈধ ভাসমান বিন্দু সংখ্যা হতে হবে।",
"hexadecimalErrorText": "মান একটি বৈধ হেক্সাডেসিমাল সংখ্যা হতে হবে।"
}
4 changes: 3 additions & 1 deletion lib/l10n/intl_bs.arb
Original file line number Diff line number Diff line change
Expand Up @@ -84,5 +84,7 @@
"dunsErrorText": "Vrijednost mora biti ispravan DUNS broj.",
"licensePlateErrorText": "Vrijednost mora biti ispravna registarska tablica.",
"vinErrorText": "Vrijednost mora biti ispravan VIN.",
"languageCodeErrorText": "Vrijednost mora biti ispravan kod jezika."
"languageCodeErrorText": "Vrijednost mora biti ispravan kod jezika.",
"floatErrorText": "Vrijednost mora biti ispravan broj s pomičnim zarezom.",
"hexadecimalErrorText": "Vrijednost mora biti ispravan heksadecimalni broj."
}
4 changes: 3 additions & 1 deletion lib/l10n/intl_ca.arb
Original file line number Diff line number Diff line change
Expand Up @@ -84,5 +84,7 @@
"dunsErrorText": "El valor ha de ser un número DUNS vàlid.",
"licensePlateErrorText": "El valor ha de ser una matrícula vàlida.",
"vinErrorText": "El valor ha de ser un VIN vàlid.",
"languageCodeErrorText": "El valor ha de ser un codi de llengua vàlid."
"languageCodeErrorText": "El valor ha de ser un codi de llengua vàlid.",
"floatErrorText": "El valor ha de ser un nombre de coma flotant vàlid.",
"hexadecimalErrorText": "El valor ha de ser un nombre hexadecimal vàlid."
}
4 changes: 3 additions & 1 deletion lib/l10n/intl_cs.arb
Original file line number Diff line number Diff line change
Expand Up @@ -84,5 +84,7 @@
"dunsErrorText": "Hodnota musí být platné číslo DUNS.",
"licensePlateErrorText": "Hodnota musí být platná poznávací značka.",
"vinErrorText": "Hodnota musí být platný VIN.",
"languageCodeErrorText": "Hodnota musí být platný kód jazyka."
"languageCodeErrorText": "Hodnota musí být platný kód jazyka.",
"floatErrorText": "Hodnota musí být platné desetinné číslo.",
"hexadecimalErrorText": "Hodnota musí být platné šestnáctkové číslo."
}
4 changes: 3 additions & 1 deletion lib/l10n/intl_da.arb
Original file line number Diff line number Diff line change
Expand Up @@ -84,5 +84,7 @@
"dunsErrorText": "Værdien skal være et gyldigt DUNS-nummer.",
"licensePlateErrorText": "Værdien skal være en gyldig nummerplade.",
"vinErrorText": "Værdien skal være en gyldig VIN.",
"languageCodeErrorText": "Værdien skal være en gyldig sprogkode."
"languageCodeErrorText": "Værdien skal være en gyldig sprogkode.",
"floatErrorText": "Værdien skal være et gyldigt flydende punkt nummer.",
"hexadecimalErrorText": "Værdien skal være et gyldigt hexadecimalt nummer."
}
4 changes: 3 additions & 1 deletion lib/l10n/intl_de.arb
Original file line number Diff line number Diff line change
Expand Up @@ -84,5 +84,7 @@
"dunsErrorText": "Der Wert muss eine gültige DUNS-Nummer sein.",
"licensePlateErrorText": "Der Wert muss ein gültiges Nummernschild sein.",
"vinErrorText": "Der Wert muss eine gültige Fahrzeug-Identifizierungsnummer (VIN) sein.",
"languageCodeErrorText": "Der Wert muss ein gültiger Sprachcode sein."
"languageCodeErrorText": "Der Wert muss ein gültiger Sprachcode sein.",
"floatErrorText": "Der Wert muss eine gültige Fließkommazahl sein.",
"hexadecimalErrorText": "Der Wert muss eine gültige hexadezimale Zahl sein."
}
4 changes: 3 additions & 1 deletion lib/l10n/intl_el.arb
Original file line number Diff line number Diff line change
Expand Up @@ -84,5 +84,7 @@
"dunsErrorText": "Η τιμή πρέπει να είναι ένας έγκυρος αριθμός DUNS.",
"licensePlateErrorText": "Η τιμή πρέπει να είναι μια έγκυρη πινακίδα κυκλοφορίας.",
"vinErrorText": "Η τιμή πρέπει να είναι ένας έγκυρος αριθμός VIN.",
"languageCodeErrorText": "Η τιμή πρέπει να είναι ένας έγκυρος κωδικός γλώσσας."
"languageCodeErrorText": "Η τιμή πρέπει να είναι ένας έγκυρος κωδικός γλώσσας.",
"floatErrorText": "Η τιμή πρέπει να είναι έγκυρος δεκαδικός αριθμός κινητής υποδιαστολής.",
"hexadecimalErrorText": "Η τιμή πρέπει να είναι έγκυρος δεκαεξαδικός αριθμός."
}
4 changes: 3 additions & 1 deletion lib/l10n/intl_en.arb
Original file line number Diff line number Diff line change
Expand Up @@ -280,5 +280,7 @@
"dunsErrorText": "Value must be a valid DUNS number.",
"licensePlateErrorText": "Value must be a valid license plate.",
"vinErrorText": "Value must be a valid VIN.",
"languageCodeErrorText": "Value must be a valid language code."
"languageCodeErrorText": "Value must be a valid language code.",
"floatErrorText": "Value must be a valid floating point number.",
"hexadecimalErrorText": "Value must be a valid hexadecimal number."
}
4 changes: 3 additions & 1 deletion lib/l10n/intl_es.arb
Original file line number Diff line number Diff line change
Expand Up @@ -84,5 +84,7 @@
"dunsErrorText": "El valor debe ser un número DUNS válido.",
"licensePlateErrorText": "El valor debe ser una placa de matrícula válida.",
"vinErrorText": "El valor debe ser un VIN válido.",
"languageCodeErrorText": "El valor debe ser un código de idioma válido."
"languageCodeErrorText": "El valor debe ser un código de idioma válido.",
"floatErrorText": "El valor debe ser un número de punto flotante válido.",
"hexadecimalErrorText": "El valor debe ser un número hexadecimal válido."
}
4 changes: 3 additions & 1 deletion lib/l10n/intl_et.arb
Original file line number Diff line number Diff line change
Expand Up @@ -84,5 +84,7 @@
"dunsErrorText": "Väärtus peab olema kehtiv DUNS number.",
"licensePlateErrorText": "Väärtus peab olema kehtiv numbrimärk.",
"vinErrorText": "Väärtus peab olema kehtiv VIN.",
"languageCodeErrorText": "Väärtus peab olema kehtiv keelekood."
"languageCodeErrorText": "Väärtus peab olema kehtiv keelekood.",
"floatErrorText": "Väärtus peab olema kehtiv ujukomaarv.",
"hexadecimalErrorText": "Väärtus peab olema kehtiv kuueteistkümnendkohtade süsteemi arv."
}
4 changes: 3 additions & 1 deletion lib/l10n/intl_fa.arb
Original file line number Diff line number Diff line change
Expand Up @@ -84,5 +84,7 @@
"dunsErrorText": "مقدار باید یک شماره DUNS معتبر باشد.",
"licensePlateErrorText": "مقدار باید یک شماره پلاک معتبر باشد.",
"vinErrorText": "مقدار باید یک شماره VIN معتبر باشد.",
"languageCodeErrorText": "مقدار باید یک کد زبان معتبر باشد."
"languageCodeErrorText": "مقدار باید یک کد زبان معتبر باشد.",
"floatErrorText": "مقدار باید یک عدد اعشاری معتبر باشد.",
"hexadecimalErrorText": "مقدار باید یک عدد هگزادسیمال معتبر باشد."
}
4 changes: 3 additions & 1 deletion lib/l10n/intl_fi.arb
Original file line number Diff line number Diff line change
Expand Up @@ -84,5 +84,7 @@
"dunsErrorText": "Arvon on oltava kelvollinen DUNS-numero.",
"licensePlateErrorText": "Arvon on oltava kelvollinen rekisterinumero.",
"vinErrorText": "Arvon on oltava kelvollinen VIN.",
"languageCodeErrorText": "Arvon on oltava kelvollinen kielikoodi."
"languageCodeErrorText": "Arvon on oltava kelvollinen kielikoodi.",
"floatErrorText": "Arvon on oltava kelvollinen liukuluku.",
"hexadecimalErrorText": "Arvon on oltava kelvollinen heksadesimaaliluku."
}
4 changes: 3 additions & 1 deletion lib/l10n/intl_fr.arb
Original file line number Diff line number Diff line change
Expand Up @@ -84,5 +84,7 @@
"dunsErrorText": "La valeur doit être un numéro DUNS valide.",
"licensePlateErrorText": "La valeur doit être une plaque d'immatriculation valide.",
"vinErrorText": "La valeur doit être un numéro VIN valide.",
"languageCodeErrorText": "La valeur doit être un code de langue valide."
"languageCodeErrorText": "La valeur doit être un code de langue valide.",
"floatErrorText": "La valeur doit être un nombre à virgule flottante valide.",
"hexadecimalErrorText": "La valeur doit être un nombre hexadécimal valide."
}
4 changes: 3 additions & 1 deletion lib/l10n/intl_he.arb
Original file line number Diff line number Diff line change
Expand Up @@ -84,5 +84,7 @@
"dunsErrorText": "הערך חייב להיות מספר DUNS חוקי.",
"licensePlateErrorText": "הערך חייב להיות מספר רכב חוקי.",
"vinErrorText": "הערך חייב להיות מספר VIN חוקי.",
"languageCodeErrorText": "הערך חייב להיות קוד שפה חוקי."
"languageCodeErrorText": "הערך חייב להיות קוד שפה חוקי.",
"floatErrorText": "הערך חייב להיות מספר נקודה צפה חוקי.",
"hexadecimalErrorText": "הערך חייב להיות מספר הקסדצימלי חוקי."
}
4 changes: 3 additions & 1 deletion lib/l10n/intl_hi.arb
Original file line number Diff line number Diff line change
Expand Up @@ -84,5 +84,7 @@
"dunsErrorText": "मान मान्य DUNS नंबर होना चाहिए।",
"licensePlateErrorText": "मान मान्य लाइसेंस प्लेट होना चाहिए।",
"vinErrorText": "मान मान्य VIN होना चाहिए।",
"languageCodeErrorText": "मान मान्य भाषा कोड होना चाहिए।"
"languageCodeErrorText": "मान मान्य भाषा कोड होना चाहिए।",
"floatErrorText": "मान्य फ़्लोटिंग पॉइंट नंबर होना चाहिए।",
"hexadecimalErrorText": "मान्य हेक्साडेसिमल नंबर होना चाहिए।"
}
4 changes: 3 additions & 1 deletion lib/l10n/intl_hr.arb
Original file line number Diff line number Diff line change
Expand Up @@ -84,5 +84,7 @@
"dunsErrorText": "Vrijednost mora biti važeći DUNS broj.",
"licensePlateErrorText": "Vrijednost mora biti važeća registarska oznaka.",
"vinErrorText": "Vrijednost mora biti važeći VIN.",
"languageCodeErrorText": "Vrijednost mora biti važeći jezični kod."
"languageCodeErrorText": "Vrijednost mora biti važeći jezični kod.",
"floatErrorText": "Vrijednost mora biti valjani broj s pomičnim zarezom.",
"hexadecimalErrorText": "Vrijednost mora biti valjani heksadecimalni broj."
}
4 changes: 3 additions & 1 deletion lib/l10n/intl_hu.arb
Original file line number Diff line number Diff line change
Expand Up @@ -84,5 +84,7 @@
"dunsErrorText": "Az értéknek egy érvényes DUNS számnak kell lennie.",
"licensePlateErrorText": "Az értéknek egy érvényes rendszámnak kell lennie.",
"vinErrorText": "Az értéknek egy érvényes járműazonosító számnak kell lennie.",
"languageCodeErrorText": "Az értéknek egy érvényes nyelvkódnak kell lennie."
"languageCodeErrorText": "Az értéknek egy érvényes nyelvkódnak kell lennie.",
"floatErrorText": "Az értéknek érvényes lebegőpontos számnak kell lennie.",
"hexadecimalErrorText": "Az értéknek érvényes hexadecimális számnak kell lennie."
}
4 changes: 3 additions & 1 deletion lib/l10n/intl_id.arb
Original file line number Diff line number Diff line change
Expand Up @@ -84,5 +84,7 @@
"dunsErrorText": "Nilai harus berupa nomor DUNS yang valid.",
"licensePlateErrorText": "Nilai harus berupa pelat nomor yang valid.",
"vinErrorText": "Nilai harus berupa VIN yang valid.",
"languageCodeErrorText": "Nilai harus berupa kode bahasa yang valid."
"languageCodeErrorText": "Nilai harus berupa kode bahasa yang valid.",
"floatErrorText": "Nilai harus berupa angka floating point yang valid.",
"hexadecimalErrorText": "Nilai harus berupa angka heksadesimal yang valid."
}
4 changes: 3 additions & 1 deletion lib/l10n/intl_it.arb
Original file line number Diff line number Diff line change
Expand Up @@ -84,5 +84,7 @@
"dunsErrorText": "Il valore deve essere un numero DUNS valido.",
"licensePlateErrorText": "Il valore deve essere una targa valida.",
"vinErrorText": "Il valore deve essere un VIN valido.",
"languageCodeErrorText": "Il valore deve essere un codice lingua valido."
"languageCodeErrorText": "Il valore deve essere un codice lingua valido.",
"floatErrorText": "Il valore deve essere un numero in virgola mobile valido.",
"hexadecimalErrorText": "Il valore deve essere un numero esadecimale valido."
}
4 changes: 3 additions & 1 deletion lib/l10n/intl_ja.arb
Original file line number Diff line number Diff line change
Expand Up @@ -84,5 +84,7 @@
"dunsErrorText": "値は有効なDUNS番号でなければなりません。",
"licensePlateErrorText": "値は有効なナンバープレートでなければなりません。",
"vinErrorText": "値は有効なVINでなければなりません。",
"languageCodeErrorText": "値は有効な言語コードでなければなりません。"
"languageCodeErrorText": "値は有効な言語コードでなければなりません。",
"floatErrorText": "値は有効な浮動小数点数でなければなりません。",
"hexadecimalErrorText": "値は有効な16進数でなければなりません。"
}
Loading

0 comments on commit 5d2fb2f

Please sign in to comment.