Gemini detect language to translate pr #127
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
# This is a basic workflow to help you get started with Actions | |
name: Auto Translated Chat - PR Check | |
# Controls when the workflow will run | |
on: | |
pull_request_target: | |
branches: | |
- main | |
# Allows you to run this workflow manually from the Actions tab | |
workflow_dispatch: | |
# A workflow run is made up of one or more jobs that can run sequentially or in parallel | |
jobs: | |
validation: | |
name: 'Run test and build android and web code' | |
runs-on: ubuntu-latest | |
concurrency: | |
cancel-in-progress: true | |
group: ${{ github.event.pull_request.number || github.event.pull_request_target.number || github.ref }} | |
steps: | |
- name: checkout source code | |
uses: actions/checkout@v4.1.7 | |
with: | |
ref: ${{ github.event.pull_request_target.head.ref || github.event.pull_request.head.ref }} | |
repository: ${{ github.event.pull_request_target.head.repo.full_name || github.event.pull_request.head.repo.full_name}} | |
- name: Setup Java | |
uses: actions/setup-java@v4 | |
with: | |
distribution: 'adopt' | |
java-version: '17' | |
- name: setup secrets | |
run: | | |
echo "$FIREBASE_OPTION" > lib/firebase_options.dart | |
echo "$ANDROID_GOOGLE_SERVICE" > android/app/google-services.json | |
env: | |
FIREBASE_OPTION: ${{ secrets.FIREBASE_OPTIONS }} | |
ANDROID_GOOGLE_SERVICE: ${{ secrets.ANDROID_GOOGLE_SERVICE }} | |
- name: Flutter action | |
uses: subosito/flutter-action@v2.16.0 | |
with: | |
flutter-version: '3.22.0' | |
channel: 'stable' | |
- name: Flutter doctor | |
run: flutter doctor | |
- name: Format code | |
run: | | |
dart format lib/*/ --fix --set-exit-if-changed | |
dart format lib/main.dart --fix --set-exit-if-changed | |
dart format test --fix --set-exit-if-changed | |
- name: analyse code | |
run: | | |
flutter pub get | |
dart analyze --fatal-infos --fatal-warnings | |
- name: Run tests | |
run: | | |
flutter test --coverage | |
- name: build apk | |
run: flutter build apk --debug | |
- name: build web | |
run: flutter build web | |
ios_validation: | |
name: 'iOS validation' | |
runs-on: macos-14 | |
concurrency: | |
cancel-in-progress: true | |
group: ${{ github.event.pull_request.number || github.event.pull_request_target.number || github.ref }} | |
needs: validation | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4.1.7 | |
with: | |
ref: ${{ github.event.sha }} | |
repository: ${{ github.event.pull_request_target.head.repo.full_name || github.event.pull_request.head.repo.full_name}} | |
fetch-depth: 0 | |
- name: setup secrets | |
run: | | |
echo "$FIREBASE_OPTION" > lib/firebase_options.dart | |
echo "$IOS_GOOGLE_SERVICE" > ios/Runner/GoogleService-Info.plist | |
env: | |
FIREBASE_OPTION: ${{ secrets.FIREBASE_OPTIONS }} | |
IOS_GOOGLE_SERVICE: ${{ secrets.IOS_GOOGLE_SERVICE }} | |
- name: Install Flutter | |
uses: subosito/flutter-action@v2.16.0 | |
with: | |
flutter-version: '3.22.0' | |
channel: 'stable' | |
# - name: setup XCode | |
# uses: maxim-lobanov/setup-xcode@v1.6.0 | |
# with: | |
# xcode-version: 15.4 | |
# - name: setup Cocoapod | |
# uses: maxim-lobanov/setup-cocoapods@v1.4.0 | |
# with: | |
# version: 1.13.0 | |
- name: build iOS no codesign | |
run: | | |
flutter pub get | |
flutter build ipa --no-codesign |