Sort terms alphabetically in ARBs #215
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Test | |
on: | |
push: | |
branches: [main] | |
pull_request: | |
branches: [main] | |
jobs: | |
test: | |
name: Test | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Set up Go | |
uses: actions/setup-go@v4 | |
with: | |
go-version-file: go.mod | |
- name: Verify code formatting | |
run: | | |
go install mvdan.cc/[email protected] | |
test -z $(gofumpt -l .) | |
- name: Run linter | |
if: always() | |
run: | | |
go install honnef.co/go/tools/cmd/[email protected] | |
staticcheck ./... | |
- name: Run tests with coverage | |
if: always() | |
run: go test -cover ./... | |
integration-test: | |
name: Integration test with Flutter ${{ matrix.flutter_version }} | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
flutter_version: ['3.16'] | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Setup Go | |
uses: actions/setup-go@v4 | |
with: | |
go-version-file: go.mod | |
- name: Build binary | |
run: | | |
go build | |
mv ./poe2arb /usr/local/bin | |
- name: Setup Flutter | |
uses: subosito/flutter-action@v2 | |
with: | |
flutter-version: '${{ matrix.flutter_version }}' | |
- name: Run integration test | |
env: | |
# Read-only POEditor token for albert+poe2arb@... | |
POEDITOR_TOKEN: ${{ secrets.POEDITOR_INTEGRATION_TESTS_TOKEN }} | |
working-directory: integration_test | |
run: | | |
poe2arb poe | |
poe2arb poe --output-dir lib/l10n_prefixed --term-prefix prefixed | |
flutter gen-l10n | |
- name: Print ARBs | |
working-directory: integration_test | |
run: | | |
for dir in l10n l10n_prefixed; do | |
for locale in en pl en_hk sr sr_cyrl es es_419; do | |
echo "=== lib/$dir/app_$locale.arb ===" | |
cat lib/$dir/app_$locale.arb | |
done | |
done |