From 53c0fa7e4bd335cf0569b0c6b7cb714608d4752c Mon Sep 17 00:00:00 2001 From: Matej Knopp Date: Mon, 28 Aug 2023 21:03:26 +0200 Subject: [PATCH] workflow --- .github/workflows/check_and_lint.yml | 23 +++++++++++++++++++++++ build_tool/analysis_options.yaml | 7 ++++--- build_tool/lib/src/build_tool.dart | 2 +- 3 files changed, 28 insertions(+), 4 deletions(-) create mode 100644 .github/workflows/check_and_lint.yml diff --git a/.github/workflows/check_and_lint.yml b/.github/workflows/check_and_lint.yml new file mode 100644 index 0000000..5763f5d --- /dev/null +++ b/.github/workflows/check_and_lint.yml @@ -0,0 +1,23 @@ +on: + pull_request: + push: + branches: + - main + +name: Check and Lint + +jobs: + Flutter: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - uses: dart-lang/setup-dart@v1 + - name: Dart Format + run: dart format . --output=none --set-exit-if-changed + working-directory: build_tool + - name: Analyze + run: dart analyze + working-directory: build_tool + - name: Test + run: dart test + working-directory: build_tool diff --git a/build_tool/analysis_options.yaml b/build_tool/analysis_options.yaml index dee8927..a1aad5b 100644 --- a/build_tool/analysis_options.yaml +++ b/build_tool/analysis_options.yaml @@ -15,9 +15,10 @@ include: package:lints/recommended.yaml # Uncomment the following section to specify additional rules. -# linter: -# rules: -# - camel_case_types +linter: + rules: + - prefer_relative_imports + - directives_ordering # analyzer: # exclude: diff --git a/build_tool/lib/src/build_tool.dart b/build_tool/lib/src/build_tool.dart index 82b57b7..0eb0f94 100644 --- a/build_tool/lib/src/build_tool.dart +++ b/build_tool/lib/src/build_tool.dart @@ -1,7 +1,6 @@ import 'dart:io'; import 'package:args/command_runner.dart'; -import 'package:build_tool/src/verify_binaries.dart'; import 'package:ed25519_edwards/ed25519_edwards.dart'; import 'package:github/github.dart'; import 'package:hex/hex.dart'; @@ -16,6 +15,7 @@ import 'options.dart'; import 'precompile_binaries.dart'; import 'target.dart'; import 'util.dart'; +import 'verify_binaries.dart'; final log = Logger('build_tool');