Add translate language #66
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/[email protected] | |
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/[email protected] | |
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 and web | |
run: | | |
flutter build apk --debug | |
flutter build web | |
ios_validation: | |
name: 'iOS validation' | |
runs-on: macos-latest | |
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/[email protected] | |
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/[email protected] | |
with: | |
flutter-version: '3.22.0' | |
channel: 'stable' | |
- name: setup XCode | |
uses: maxim-lobanov/[email protected] | |
with: | |
xcode-version: 15.4 | |
- name: setup Cocoapod | |
uses: maxim-lobanov/[email protected] | |
with: | |
version: 1.13.0 | |
- name: build iOS no codesign | |
run: | | |
flutter pub get | |
flutter build ipa --no-codesign |