Add pana job
This commit is contained in:
@@ -1,9 +1,8 @@
|
|||||||
|
|
||||||
name: Build web app
|
name: Build web app
|
||||||
|
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
branches: [ "main" ]
|
branches: ["main"]
|
||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
@@ -14,7 +13,7 @@ jobs:
|
|||||||
- name: Setup Flutter
|
- name: Setup Flutter
|
||||||
uses: subosito/flutter-action@v2
|
uses: subosito/flutter-action@v2
|
||||||
with:
|
with:
|
||||||
channel: 'stable'
|
channel: "stable"
|
||||||
- run: flutter --version
|
- run: flutter --version
|
||||||
|
|
||||||
- name: Cache pub dependencies
|
- name: Cache pub dependencies
|
||||||
@@ -28,7 +27,7 @@ jobs:
|
|||||||
run: flutter pub get
|
run: flutter pub get
|
||||||
|
|
||||||
- name: Build Web App
|
- name: Build Web App
|
||||||
run: cd example && flutter build web --base-href=/universal_ble/
|
run: cd example && flutter build web --base-href=/${{ github.event.repository.name }}/
|
||||||
|
|
||||||
- name: Deploy to GitHub Pages 🚀
|
- name: Deploy to GitHub Pages 🚀
|
||||||
uses: JamesIves/github-pages-deploy-action@v4
|
uses: JamesIves/github-pages-deploy-action@v4
|
||||||
|
|||||||
@@ -0,0 +1,58 @@
|
|||||||
|
name: Pull Request
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches: [main]
|
||||||
|
pull_request:
|
||||||
|
branches: [main]
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
test:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v4
|
||||||
|
|
||||||
|
- name: Set up Flutter
|
||||||
|
uses: subosito/flutter-action@v2
|
||||||
|
with:
|
||||||
|
channel: stable
|
||||||
|
|
||||||
|
- name: Install dependencies
|
||||||
|
run: flutter pub get
|
||||||
|
|
||||||
|
- name: Analyze project source
|
||||||
|
run: flutter analyze
|
||||||
|
|
||||||
|
- name: Run Flutter tests
|
||||||
|
run: flutter test
|
||||||
|
|
||||||
|
- name: Install Chrome
|
||||||
|
uses: browser-actions/setup-chrome@latest
|
||||||
|
|
||||||
|
- name: Run Flutter tests on Chrome
|
||||||
|
uses: coactions/setup-xvfb@v1
|
||||||
|
with:
|
||||||
|
run: flutter test --platform chrome
|
||||||
|
|
||||||
|
pana:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v4
|
||||||
|
|
||||||
|
- uses: subosito/flutter-action@v2
|
||||||
|
|
||||||
|
- name: Install Dependencies
|
||||||
|
run: |
|
||||||
|
flutter packages get
|
||||||
|
flutter pub global activate pana
|
||||||
|
sudo apt-get install webp
|
||||||
|
|
||||||
|
- name: Verify Pub Score
|
||||||
|
run: |
|
||||||
|
PANA=$(pana . --no-warning); PANA_SCORE=$(echo $PANA | sed -n "s/.*Points: \([0-9]*\)\/\([0-9]*\)./\1\/\2/p")
|
||||||
|
echo "score: $PANA_SCORE"
|
||||||
|
IFS='/'; read -a SCORE_ARR <<< "$PANA_SCORE"; SCORE=SCORE_ARR[0]; TOTAL=SCORE_ARR[1]
|
||||||
|
if [ -z "$1" ]; then MINIMUM_SCORE=TOTAL; else MINIMUM_SCORE=$1; fi
|
||||||
|
if (( $SCORE < $MINIMUM_SCORE )); then echo "minimum score $MINIMUM_SCORE was not met!"; exit 1; fi
|
||||||
@@ -1,36 +0,0 @@
|
|||||||
name: BleUuidParser Tests
|
|
||||||
|
|
||||||
on:
|
|
||||||
push:
|
|
||||||
branches: [ main ]
|
|
||||||
pull_request:
|
|
||||||
branches: [ main ]
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
test:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v4
|
|
||||||
|
|
||||||
- name: Set up Flutter
|
|
||||||
uses: subosito/flutter-action@v2
|
|
||||||
with:
|
|
||||||
channel: stable
|
|
||||||
|
|
||||||
- name: Install dependencies
|
|
||||||
run: flutter pub get
|
|
||||||
|
|
||||||
- name: Analyze project source
|
|
||||||
run: flutter analyze
|
|
||||||
|
|
||||||
- name: Run Flutter tests
|
|
||||||
run: flutter test
|
|
||||||
|
|
||||||
- name: Install Chrome
|
|
||||||
uses: browser-actions/setup-chrome@latest
|
|
||||||
|
|
||||||
- name: Run Flutter tests on Chrome
|
|
||||||
uses: coactions/setup-xvfb@v1
|
|
||||||
with:
|
|
||||||
run: flutter test --platform chrome
|
|
||||||
@@ -44,7 +44,7 @@ android {
|
|||||||
applicationId "com.navideck.universal_ble_example"
|
applicationId "com.navideck.universal_ble_example"
|
||||||
// You can update the following values to match your application needs.
|
// You can update the following values to match your application needs.
|
||||||
// For more information, see: https://docs.flutter.dev/deployment/android#reviewing-the-gradle-build-configuration.
|
// For more information, see: https://docs.flutter.dev/deployment/android#reviewing-the-gradle-build-configuration.
|
||||||
minSdkVersion 21
|
minSdkVersion flutter.minSdkVersion
|
||||||
targetSdkVersion 35
|
targetSdkVersion 35
|
||||||
versionCode flutterVersionCode.toInteger()
|
versionCode flutterVersionCode.toInteger()
|
||||||
versionName flutterVersionName
|
versionName flutterVersionName
|
||||||
|
|||||||
@@ -20,9 +20,9 @@ EXTERNAL SOURCES:
|
|||||||
:path: Flutter/ephemeral/.symlinks/plugins/universal_ble/darwin
|
:path: Flutter/ephemeral/.symlinks/plugins/universal_ble/darwin
|
||||||
|
|
||||||
SPEC CHECKSUMS:
|
SPEC CHECKSUMS:
|
||||||
device_info_plus: 5401765fde0b8d062a2f8eb65510fb17e77cf07f
|
device_info_plus: b0fafc687fb901e2af612763340f1b0d4352f8e5
|
||||||
FlutterMacOS: d0db08ddef1a9af05a5ec4b724367152bb0500b1
|
FlutterMacOS: d0db08ddef1a9af05a5ec4b724367152bb0500b1
|
||||||
universal_ble: cf52a7b3fd2e7c14d6d7262e9fdadb72ab6b88a6
|
universal_ble: ff19787898040d721109c6324472e5dd4bc86adc
|
||||||
|
|
||||||
PODFILE CHECKSUM: 9ebaf0ce3d369aaa26a9ea0e159195ed94724cf3
|
PODFILE CHECKSUM: 9ebaf0ce3d369aaa26a9ea0e159195ed94724cf3
|
||||||
|
|
||||||
|
|||||||
@@ -235,7 +235,7 @@ class UniversalBle {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// Write a characteristic value.
|
/// Write a characteristic value.
|
||||||
/// To write a characteristic value without response, set [withoutResponse] to [true].
|
/// To write a characteristic value without response, set [withoutResponse] to `true`.
|
||||||
static Future<void> write(
|
static Future<void> write(
|
||||||
String deviceId,
|
String deviceId,
|
||||||
String service,
|
String service,
|
||||||
@@ -364,7 +364,7 @@ class UniversalBle {
|
|||||||
|
|
||||||
/// Get connected devices to the system (connected by any app).
|
/// Get connected devices to the system (connected by any app).
|
||||||
/// Use [withServices] to filter devices by services.
|
/// Use [withServices] to filter devices by services.
|
||||||
/// On `Apple`, [withServices] is required to get any connected devices. If not passed, several [18XX] generic services will be set by default.
|
/// On `Apple`, [withServices] is required to get any connected devices. If not passed, several 18XX generic services will be set by default.
|
||||||
/// On `Android`, `Linux` and `Windows`, if [withServices] is used, then internally all services will be discovered for each device first (either by connecting or by using cached services).
|
/// On `Android`, `Linux` and `Windows`, if [withServices] is used, then internally all services will be discovered for each device first (either by connecting or by using cached services).
|
||||||
/// Not supported on `Web`.
|
/// Not supported on `Web`.
|
||||||
static Future<List<BleDevice>> getSystemDevices({
|
static Future<List<BleDevice>> getSystemDevices({
|
||||||
|
|||||||
Reference in New Issue
Block a user