Commit e48d579

derdilla <82763757+NobodyForNothing@users.noreply.github.com>
2024-03-30 10:07:09
update workflows
Signed-off-by: derdilla <82763757+NobodyForNothing@users.noreply.github.com>
1 parent a8cee49
.github/workflows/app-CI.yml
@@ -0,0 +1,59 @@
+name: app-CI
+
+on:
+  push:
+    branches:
+      - 'main'
+    paths:
+      - "app/**"
+      - "health_data_store/**"
+      - ".github/workflows/app-CI.yml"
+  workflow_dispatch:
+
+jobs:
+  test:
+    runs-on: ubuntu-latest
+ 
+    steps:
+    - name: Checkout code
+      uses: actions/checkout@v4
+      with:
+        # ensures there are no unexpected directories needed
+        sparse-checkout: |
+          app
+          health_data_store
+    - name: Setup Flutter
+      uses: subosito/flutter-action@v2
+      with:
+        # flutter-version: '3.18.0-0.2.pre'
+        channel: 'beta'
+    - name: Get dependencies
+      run: flutter pub get
+      working-directory: ./app
+    - name: Run tests
+      run: flutter test
+      working-directory: ./app
+
+  build-android:
+    runs-on: ubuntu-latest
+ 
+    steps:
+    - name: Checkout code
+      uses: actions/checkout@v4
+    - name: Setup Java
+      uses: actions/setup-java@v2
+      with:
+        distribution: 'zulu'
+        java-version: '11'
+    - name: Setup Flutter
+      uses: subosito/flutter-action@v2
+      with:
+        # flutter-version: '3.18.0-0.2.pre'
+        channel: 'beta'
+    - name: Get dependencies
+      run: flutter pub get
+      working-directory: ./app
+    
+    - name: Build apk
+      run: flutter build apk --flavor github --debug
+      working-directory: ./app
.github/workflows/CI.yml
@@ -1,44 +0,0 @@
-name: CI
-
-on:
-  push:
-    branches:
-      - 'main'
-    paths:
-      - "app/**"
-      - ".github/workflows/CI.yml"
-  workflow_dispatch:
-
-jobs:
-  test:
-    runs-on: ubuntu-latest
- 
-    steps:
-    - uses: actions/checkout@v3
-    - uses: subosito/flutter-action@v2
-      with:
-        flutter-version: '3.18.0-0.2.pre'
-        channel: 'beta'
-    - run: flutter pub get
-      working-directory: ./app
-    - run: flutter test
-      working-directory: ./app
-
-  build-android:
-    runs-on: ubuntu-latest
- 
-    steps:
-    - uses: actions/checkout@v3
-    - uses: actions/setup-java@v2
-      with:
-        distribution: 'zulu'
-        java-version: '11'
-    - uses: subosito/flutter-action@v2
-      with:
-        flutter-version: '3.18.0-0.2.pre'
-        channel: 'beta'
-    - run: flutter pub get
-      working-directory: ./app
-    
-    - run: flutter build apk --flavor github --debug
-      working-directory: ./app
.github/workflows/docs.yml
@@ -1,11 +1,12 @@
 name: Build and deploy developer docs
+# Disabled until a solution for mono repos is found
 on:
-    push:
-        branches:
-           - "main"
-        paths:
-           - "lib/**"
-           - "README.md"
+    #push:
+    #    branches:
+    #       - "main"
+    #    paths:
+    #       - "lib/**"
+    #       - "README.md"
     workflow_dispatch:
 jobs:
     build-docs:
@@ -17,12 +18,6 @@ jobs:
         - name: Checkout code
           uses: actions/checkout@v4
 
-        - uses: subosito/flutter-action@v2
-          with:
-            flutter-version: '3.x'
-            channel: stable
-            cache: true
-
         - name: Setup Dart
           uses: dart-lang/setup-dart@v1
 
.github/workflows/fastlane-meta.yml
@@ -1,12 +1,14 @@
 name: Fastlane Metadata
 on:
   push:
-    branches: '**'
+    branches:
+    - '**'
     paths:
       - "fastlane/**"
       - ".github/workflows/fastlane-meta.yml"
   pull_request:
-    branches: '**'
+    branches:
+    - '**'
     paths:
       - "fastlane/**"
       - ".github/workflows/fastlane-meta.yml"
@@ -14,9 +16,10 @@ on:
     
 jobs:
   validate:
-      name: Validate
       runs-on: ubuntu-latest
       steps:
-        - uses: actions/checkout@v3
-        - uses: ashutoshgngwr/validate-fastlane-supply-metadata@v2
-  
+        - uses: actions/checkout@v4
+          with:
+            sparse-checkout: |
+              fastlane
+        - uses: ashutoshgngwr/validate-fastlane-supply-metadata@v2
\ No newline at end of file
.github/workflows/pkg-CI.yml
@@ -0,0 +1,36 @@
+name: pkg-CI
+
+on:
+  push:
+    branches:
+      - 'main'
+    paths:
+      - "health_data_store/**"
+      - ".github/workflows/pkg-CI.yml"
+  workflow_dispatch:
+
+jobs:
+  test-health_data_store:
+    runs-on: ubuntu-latest
+ 
+    steps:
+    - name: Checkout code
+      uses: actions/checkout@v4
+      with:
+        # ensures there are no unexpected directories needed
+        sparse-checkout: |
+          health_data_store
+    - name: Setup dart
+      uses: dart-lang/setup-dart@v1
+      with:
+        sdk: 'beta'
+
+    - name: Get dependencies
+      run: dart pub get
+      working-directory: ./health_data_store
+    - name: Analyze code
+      run: dart analyze
+      working-directory: ./health_data_store
+    - name: Run tests
+      run: dart test
+      working-directory: ./health_data_store
app/pubspec.yaml
@@ -25,16 +25,18 @@ dependencies:
   sqflite:
   shared_preferences: ^2.1.1
   url_launcher: ^6.1.11
+  health_data_store:
+    path: ../health_data_store/
+  sqlparser: ^0.34.1
+  flutter_bloc: ^8.1.4
+  flutter_reactive_ble: ^5.3.1
+  permission_handler: ^11.3.1
 
   # can become one custom dependency
   file_picker: ^5.2.11  # MIT
   jsaver: ^1.2.0
   restart_app: ^1.2.1
   fluttertoast: ^8.2.4
-  sqlparser: ^0.34.1
-  flutter_bloc: ^8.1.4
-  flutter_reactive_ble: ^5.3.1
-  permission_handler: ^11.3.1
 
 dev_dependencies:
   file: any
README.md
@@ -70,7 +70,9 @@ The easiest way to do this is [weblate](https://hosted.weblate.org/engage/blood-
 ### Pull requests
 If you can code, you can fix issues or implement features from the issues page. While not a strict requirement, it is recommended to talk about it in an issue first.
 
-[developer docs](https://bpapp.derdilla.com/)
+All parts of the code have extensive documentation and some additional information can be found in the [docs](https://github.com/NobodyForNothing/blood-pressure-monitor-fl/tree/main/docs) folder. 
+
+<!--[developer docs](https://bpapp.derdilla.com/)-->
 
 ### Donations
 If you have too much money, I would advise you to donate to either [F-Droid](https://f-droid.org/en/donate/), [Weblate](https://weblate.org/en/donate/), or some other service that has unavoidable maintenance costs.