diff --git a/.github/workflows/dart_package.yml b/.github/workflows/dart_package.yml index 3f078873..faae7ddd 100644 --- a/.github/workflows/dart_package.yml +++ b/.github/workflows/dart_package.yml @@ -19,6 +19,10 @@ on: required: false type: string default: "stable" + format_directories: + required: false + type: string + default: "." min_coverage: required: false type: number @@ -73,7 +77,7 @@ jobs: run: ${{inputs.setup}} - name: ✨ Check Formatting - run: dart format --set-exit-if-changed . + run: dart format --set-exit-if-changed ${{inputs.format_directories}} - name: 🕵️ Analyze run: dart analyze --fatal-infos --fatal-warnings ${{inputs.analyze_directories}} diff --git a/.github/workflows/flutter_package.yml b/.github/workflows/flutter_package.yml index 225f3322..566dede9 100644 --- a/.github/workflows/flutter_package.yml +++ b/.github/workflows/flutter_package.yml @@ -23,6 +23,10 @@ on: required: false type: string default: "" + format_directories: + required: false + type: string + default: "lib test" min_coverage: required: false type: number @@ -83,7 +87,7 @@ jobs: run: ${{inputs.setup}} - name: ✨ Check Formatting - run: dart format --set-exit-if-changed lib test + run: dart format --set-exit-if-changed ${{inputs.format_directories}} - name: 🕵️ Analyze run: flutter analyze ${{inputs.analyze_directories}} diff --git a/README.md b/README.md index a1c116d0..a52c7767 100644 --- a/README.md +++ b/README.md @@ -91,6 +91,12 @@ The Dart package workflow consists of the following steps: **Default** `"lib test"` +#### `format_directories` + +**Optional** A space separated list of folders that should be formatted. + +**Default** `"."` + #### `check_ignore` **Optional** Allows ignoring lines from [coverage][coverage]. @@ -159,6 +165,12 @@ The Flutter package workflow consists of the following steps: **Default** `"lib test"` +#### `format_directories` + +**Optional** A space separated list of folders that should be formatted. + +**Default** `"lib test"` + #### `concurrency` **Optional** The number of concurrent test suites run. @@ -592,4 +604,4 @@ jobs: [very_good_workflows_blog_link]: https://verygood.ventures/blog/configuring-workflows-for-your-flutter-projects?utm_source=github&utm_medium=readme&utm_campaign=workflows_readme [commitizen]: https://github.com/commitizen/conventional-commit-types [coverage]: https://pub.dev/packages/coverage -[github_actions_secrets_docs]: https://docs.github.com/en/rest/actions/secrets \ No newline at end of file +[github_actions_secrets_docs]: https://docs.github.com/en/rest/actions/secrets