Browse Source

chore: update flutter_ci.yaml

Nathan.fooo 2 years ago
parent
commit
e0a392db00
1 changed files with 13 additions and 17 deletions
  1. 13 17
      .github/workflows/flutter_ci.yaml

+ 13 - 17
.github/workflows/flutter_ci.yaml

@@ -24,17 +24,17 @@ jobs:
     strategy:
     strategy:
       fail-fast: false
       fail-fast: false
       matrix:
       matrix:
-        job:
-          - { target: x86_64-unknown-linux-gnu, os: ubuntu-latest,}
-          - { target: x86_64-apple-darwin, os: macos-latest, }
-          - { target: x86_64-pc-windows-msvc, os: windows-latest, }
+        os: [ubuntu-latest, macos-latest, windows-latest]
         include:
         include:
           - os: ubuntu-latest
           - os: ubuntu-latest
             flutter_profile: development-linux-x86_64
             flutter_profile: development-linux-x86_64
+            target: x86_64-unknown-linux-gnu
           - os: macos-latest
           - os: macos-latest
             flutter_profile: development-mac-x86_64
             flutter_profile: development-mac-x86_64
+            target: x86_64-apple-darwin
           - os: windows-latest
           - os: windows-latest
             flutter_profile: development-windows-x86
             flutter_profile: development-windows-x86
+            target: x86_64-pc-windows-msvc
     runs-on: ${{ matrix.os }}
     runs-on: ${{ matrix.os }}
 
 
     steps:
     steps:
@@ -46,9 +46,8 @@ jobs:
         uses: actions-rs/toolchain@v1
         uses: actions-rs/toolchain@v1
         with:
         with:
           toolchain: ${{ env.RUST_TOOLCHAIN }}
           toolchain: ${{ env.RUST_TOOLCHAIN }}
-          target: ${{ matrix.job.target }}
+          target: ${{ matrix.target }}
           override: true
           override: true
-          components: rustfmt
           profile: minimal
           profile: minimal
 
 
       - name: Install flutter
       - name: Install flutter
@@ -73,13 +72,14 @@ jobs:
             sudo wget -qO /etc/apt/trusted.gpg.d/dart_linux_signing_key.asc https://dl-ssl.google.com/linux/linux_signing_key.pub
             sudo wget -qO /etc/apt/trusted.gpg.d/dart_linux_signing_key.asc https://dl-ssl.google.com/linux/linux_signing_key.pub
             sudo wget -qO /etc/apt/sources.list.d/dart_stable.list https://storage.googleapis.com/download.dartlang.org/linux/debian/dart_stable.list
             sudo wget -qO /etc/apt/sources.list.d/dart_stable.list https://storage.googleapis.com/download.dartlang.org/linux/debian/dart_stable.list
             sudo apt-get update
             sudo apt-get update
-            sudo apt-get install -y dart curl build-essential libsqlite3-dev libssl-dev clang cmake ninja-build pkg-config libgtk-3-dev
+            sudo apt-get install -y dart curl build-essential libssl-dev clang cmake ninja-build pkg-config libgtk-3-dev
             sudo apt-get install keybinder-3.0
             sudo apt-get install keybinder-3.0
           elif [ "$RUNNER_OS" == "Windows" ]; then
           elif [ "$RUNNER_OS" == "Windows" ]; then
             vcpkg integrate install
             vcpkg integrate install
           elif [ "$RUNNER_OS" == "macOS" ]; then
           elif [ "$RUNNER_OS" == "macOS" ]; then
             echo 'do nothing'
             echo 'do nothing'
           fi
           fi
+          cargo make appflowy-deps-tools
         shell: bash
         shell: bash
 
 
       - name: Enable Flutter Desktop
       - name: Enable Flutter Desktop
@@ -102,16 +102,12 @@ jobs:
         working-directory: frontend/app_flowy
         working-directory: frontend/app_flowy
         run: flutter analyze
         run: flutter analyze
 
 
-      - name: Build Flutter unit test lib
-        working-directory: frontend
-        run: |
-          cargo make build-test-lib
-
       - name: Run Flutter unit tests
       - name: Run Flutter unit tests
-        working-directory: frontend/app_flowy
+        working-directory: frontend
         run: |
         run: |
-          if [ "$RUNNER_OS" == "Linux" ]; then
-            flutter pub get
-            flutter test
+          if [ "$RUNNER_OS" == "macOS" ]; then
+            cargo make dart_unit_test
+          elif [ "$RUNNER_OS" == "Windows" ]; then
+            cargo make dart_unit_test
           fi
           fi
-        shell: bash
+        shell: bash