Skip to content

Translations update from Hosted Weblate #98

Translations update from Hosted Weblate

Translations update from Hosted Weblate #98

Workflow file for this run

name: Test
on:
pull_request:
# Due to a flutter bug, flutter build is not generating localizations
# workaround by always running flutter pub get immediately before building,
# and performing build for msix:create manually to allow implementing this workaround
jobs:
check-formatting:
name: Ensure correct formatting
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v6
- name: Setup Java
uses: actions/setup-java@v5
with:
distribution: 'zulu'
java-version: '17'
- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get install -y build-essential cmake ninja-build libgtk-3-dev
- name: Set up Flutter
uses: subosito/flutter-action@v2
with:
channel: 'stable'
- name: Verify Flutter setup
run: flutter doctor
- name: Get dependencies
run: flutter pub get
- name: Verify code formatting
run: |
# Format locally generated localization files to prevent false positives
dart format lib/l10n/
dart format --output=none --set-exit-if-changed lib/
check-codegen:
name: Ensure correct code generation
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v6
- name: Setup Java
uses: actions/setup-java@v5
with:
distribution: 'zulu'
java-version: '17'
- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get install -y build-essential cmake ninja-build libgtk-3-dev
- name: Set up Flutter
uses: subosito/flutter-action@v2
with:
channel: 'stable'
- name: Verify Flutter setup
run: flutter doctor
- name: Get dependencies
run: flutter pub get
- name: Verify code generation
run: |
dart run build_runner build --delete-conflicting-outputs
git add . # new files are not tracked by git
if git diff --cached --name-only | grep -q '\.g\.dart$'; then
echo "Code generation is different, diff follows"
git diff --cached | cat
exit 2
fi
- name: Verify splash screen generation
run: |
git reset HEAD -- . # clear any staged changes from previous steps
dart run flutter_native_splash:create --path=flutter_native_splash.yaml
git add .
if git diff --cached --name-only | grep -v pubspec.lock | grep -q .; then
echo "Splash screen generation is different, diff follows"
git diff --cached | cat
exit 2
fi