Translations update from Hosted Weblate (#610) #203
This file contains hidden or 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: '📱 Application' | |
| on: | |
| push: | |
| branches: | |
| - 'main' | |
| paths: | |
| - "app/**" | |
| - "health_data_store/**" | |
| - "extendend-testing.yml" | |
| workflow_dispatch: | |
| jobs: | |
| run-tests: | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: write | |
| pull-requests: write | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| with: | |
| # ensures there are no unexpected directories needed | |
| sparse-checkout: | | |
| app | |
| health_data_store | |
| - name: Cache generated health data store | |
| id: cache-generated | |
| uses: actions/cache@v4 | |
| with: | |
| path: health_data_store/lib | |
| key: builder-${{ hashFiles('health_data_store/pubspec.yaml', 'health_data_store/lib/*', 'health_data_store/lib/**/*dart') }} | |
| - name: Setup dart | |
| if: steps.cache-generated.outputs.cache-hit != 'true' | |
| uses: dart-lang/setup-dart@v1 | |
| with: | |
| sdk: stable | |
| - name: Generate code | |
| if: steps.cache-generated.outputs.cache-hit != 'true' | |
| run: dart run build_runner build | |
| working-directory: health_data_store | |
| - name: Extract Flutter version | |
| id: get_version | |
| run: | | |
| # This is the same function f-droid uses to ensure their builds keep succeeding: | |
| # https://gitlab.com/fdroid/fdroiddata/-/blob/master/metadata/com.derdilla.bloodPressureApp.yml | |
| VERSION=$(sed -n -E "s/.*flutter:\s*'(.*)'/\1/p" app/pubspec.yaml) | |
| if [ -z "$VERSION" ]; then | |
| echo "Error: Could not find a Flutter version specified in app/pubspec.yaml." | |
| exit 1 | |
| fi | |
| echo "version=$VERSION" >> $GITHUB_OUTPUT | |
| - name: Setup Flutter | |
| uses: subosito/flutter-action@v2 | |
| with: | |
| flutter-version: ${{ steps.get_version.outputs.version }} | |
| cache: true | |
| - name: Disable analytics | |
| run: | |
| flutter config --no-analytics --suppress-analytics | |
| - name: Update app dependencies | |
| run: flutter pub get | |
| working-directory: app | |
| - name: Generate app mock code # no efficient caching possible | |
| run: flutter pub run build_runner build | |
| working-directory: app | |
| - name: Run tests | |
| run: flutter test | |
| working-directory: app |