mirror of
https://github.com/gabehf/Fladder.git
synced 2026-03-09 15:38:13 -07:00
[Setup] Added build.yaml and check.yaml (#1)
Co-authored-by: PartyDonut <PartyDonut@users.noreply.github.com>
This commit is contained in:
parent
226686eb18
commit
7b3e733b76
112 changed files with 3926 additions and 3784 deletions
49
.github/workflows/checks.yaml
vendored
Normal file
49
.github/workflows/checks.yaml
vendored
Normal file
|
|
@ -0,0 +1,49 @@
|
|||
name: Flutter checks
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
branches:
|
||||
- develop
|
||||
workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
linting:
|
||||
name: Linting & Formatting
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v4.1.1
|
||||
|
||||
- name: Set up Flutter
|
||||
uses: subosito/flutter-action@v2.16.0
|
||||
with:
|
||||
channel: ${{ vars.FLUTTER_CHANNEL }}
|
||||
flutter-version: ${{ vars.FLUTTER_VERSION }}
|
||||
cache: true
|
||||
cache-key: "flutter-:os:-:channel:-:version:-:arch:-:hash:"
|
||||
cache-path: "${{ runner.tool_cache }}/flutter/:channel:-:version:-:arch:"
|
||||
|
||||
- name: Get dependencies
|
||||
run: flutter pub get
|
||||
|
||||
- name: Install arb_utils to check sorting of translations
|
||||
run: dart pub global activate arb_utils
|
||||
|
||||
- name: Copy translation file
|
||||
run: cp ./lib/l10n/app_en.arb ./lib/l10n/app_en_sorted.arb
|
||||
|
||||
- name: Sort translation file alphabetically
|
||||
run: arb_utils sort ./lib/l10n/app_en.arb
|
||||
|
||||
- name: Check sorted translations against english base
|
||||
run: |
|
||||
# Check if the contents of the destination file match the reference file
|
||||
if cmp -s "./lib/l10n/app_en.arb" "./lib/l10n/app_en_sorted.arb"; then
|
||||
echo "Translation entries are in alphabetical order."
|
||||
else
|
||||
echo "Translation entries are not in alphabetical order."
|
||||
exit 1 # Fail the workflow if files are not the same
|
||||
fi
|
||||
|
||||
- name: Linting
|
||||
run: flutter analyze --no-fatal-infos --no-fatal-warnings
|
||||
Loading…
Add table
Add a link
Reference in a new issue