ソースを参照

ci: generate language files and install pb tools

appflowy 3 年 前
コミット
82ac2a5d79
2 ファイル変更16 行追加1 行削除
  1. 4 1
      .github/workflows/frontend_dart.yml
  2. 12 0
      .github/workflows/frontend_rust.yml

+ 4 - 1
.github/workflows/frontend_dart.yml

@@ -28,7 +28,10 @@ jobs:
           channel: "dev"
           channel: "dev"
       - name: flutter pub get
       - name: flutter pub get
         working-directory: frontend/app_flowy
         working-directory: frontend/app_flowy
-        run: flutter pub get
+        run:
+          flutter pub get
+          flutter pub run easy_localization:generate -S assets/translations/
+          flutter pub run easy_localization:generate -f keys -o locale_keys.g.dart -S assets/translations -s en.json
       - name: flutter analyze
       - name: flutter analyze
         working-directory: frontend/app_flowy
         working-directory: frontend/app_flowy
         run: flutter analyze
         run: flutter analyze

+ 12 - 0
.github/workflows/frontend_rust.yml

@@ -34,6 +34,12 @@ jobs:
         with:
         with:
           toolchain: stable
           toolchain: stable
           override: true
           override: true
+      - name: Install protobuf tool
+      - run:
+          cargo install --force cargo-make
+          cargo make flowy_dev
+          echo PATH="$PATH":"$HOME/.pub-cache/bin" >> $GITHUB_PATH
+        working-directory: frontend
       - run: rustup component add clippy
       - run: rustup component add clippy
         working-directory: frontend/rust-lib
         working-directory: frontend/rust-lib
       - run: cargo clippy
       - run: cargo clippy
@@ -51,6 +57,12 @@ jobs:
           source $HOME/.cargo/env
           source $HOME/.cargo/env
           rustup toolchain install stable
           rustup toolchain install stable
           rustup default stable
           rustup default stable
+      - name: Install protobuf tool
+      - run:
+          cargo install --force cargo-make
+          cargo make flowy_dev
+          echo PATH="$PATH":"$HOME/.pub-cache/bin" >> $GITHUB_PATH
+        working-directory: frontend
       - name: Frontend tests
       - name: Frontend tests
         working-directory: frontend/rust-lib
         working-directory: frontend/rust-lib
         run: cargo test
         run: cargo test