From 396ec2cc38ed5fd43c12eb7ecff19b2c5aef9fa8 Mon Sep 17 00:00:00 2001 From: Boram Bae Date: Wed, 15 Sep 2021 11:49:04 +0900 Subject: [PATCH] Add an action to analyze packages Signed-off-by: Boram Bae --- .github/workflows/{format.yml => analyze.yml} | 7 ++++++- tools/commands/build_example.py | 5 ++--- 2 files changed, 8 insertions(+), 4 deletions(-) rename .github/workflows/{format.yml => analyze.yml} (84%) diff --git a/.github/workflows/format.yml b/.github/workflows/analyze.yml similarity index 84% rename from .github/workflows/format.yml rename to .github/workflows/analyze.yml index 6dddc201b..1ec977915 100644 --- a/.github/workflows/format.yml +++ b/.github/workflows/analyze.yml @@ -1,4 +1,4 @@ -name: Format +name: Analyze on: [push, pull_request] @@ -10,6 +10,7 @@ jobs: - uses: subosito/flutter-action@v1 with: flutter-version: "2.2.1" + channel: "stable" - name: Install pub dependencies run: | for d in `pwd`/packages/*/; do @@ -18,6 +19,10 @@ jobs: done - name: Verify formatting run: flutter format --set-exit-if-changed packages + - name: Analyze the plugin's Dart code + run: | + cd packages + flutter analyze clang: runs-on: ubuntu-latest steps: diff --git a/tools/commands/build_example.py b/tools/commands/build_example.py index 46a571b82..d91fe7175 100755 --- a/tools/commands/build_example.py +++ b/tools/commands/build_example.py @@ -12,9 +12,8 @@ def parse_args(args): return parser.parse_args(args) -def _build_examples(plugin): - name = os.path.basename(plugin) - example_dir = os.path.join(plugin, 'example') +def _build_examples(plugin_dir): + example_dir = os.path.join(plugin_dir, 'example') subprocess.run('flutter-tizen pub get', shell=True, cwd=example_dir) completed_process = subprocess.run('flutter-tizen build tpk --device-profile wearable -v',