Skip to content

chore: example app release v2.7.1 (#191) #283

chore: example app release v2.7.1 (#191)

chore: example app release v2.7.1 (#191) #283

Workflow file for this run

# Runs flutter unit tests, formatting test and CHANGELOG.md validation on every PR to main.
name: test
on:
pull_request:
branches:
- main
push:
branches:
- main
# Ensure that new pushes/updates cancel running jobs
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- uses: subosito/flutter-action@v2
with:
flutter-version: 3.38.x
cache: true
- name: Flutter setup
run: |
flutter doctor -v
flutter pub get
- name: Format check
run: dart format --page-width=120 --trailing-commas=preserve -o none --set-exit-if-changed .
- name: Flutter test # takes ~ 60s, hence we store the artifact for sonar
run: |
dart run build_runner build --delete-conflicting-outputs
flutter test --coverage
- uses: actions/upload-artifact@v6
with:
name: gen_srcs-and-coverage
path: |
coverage/
**/*.g.dart
**/*.mocks.dart
- name: Check publishable to pub.dev
run: flutter pub publish --dry-run
package_scorer:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- uses: axel-op/dart-package-analyzer@v3
id: analysis
with:
githubToken: ${{ secrets.GITHUB_TOKEN }}
### FROM HERE: ALL DONE AFTER VALIDATION SUCCEEDS
sonar_analysis:
name: SonarScanning on SonarCloud
runs-on: ubuntu-latest
needs: [ test ]
steps:
- uses: actions/checkout@v6
- uses: subosito/flutter-action@v2
with:
flutter-version: 3.38.x
cache: true
- name: Get dependencies
run: flutter pub get
- name: Download gen srcs and coverage
uses: actions/download-artifact@v7
with:
name: gen_srcs-and-coverage
- name: Official SonarQube Scan
uses: SonarSource/sonarqube-scan-action@v7.0.0
env:
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
build-examples:
needs: [ test ]
uses: ./.github/workflows/example_app_build.yml
with:
flutter_sdks: '["3.32.x","3.38.x"]'
secrets:
example_app_env_file_base64: ${{ secrets.EXAMPLE_APP_ENV_FILE_PROD_BASE64 }}