-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
96 changed files
with
1,493 additions
and
779 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,134 @@ | ||
name: Flutter Package Workflow | ||
|
||
on: | ||
workflow_call: | ||
inputs: | ||
analyze_directories: | ||
required: false | ||
type: string | ||
default: "lib test" | ||
concurrency: | ||
required: false | ||
type: number | ||
default: 4 | ||
coverage_excludes: | ||
required: false | ||
type: string | ||
default: "" | ||
flutter_channel: | ||
required: false | ||
type: string | ||
default: "stable" | ||
dart_sdk: | ||
required: false | ||
type: string | ||
default: "" | ||
flutter_version: | ||
required: false | ||
type: string | ||
default: "" | ||
format_directories: | ||
required: false | ||
type: string | ||
default: "lib test" | ||
format_line_length: | ||
required: false | ||
type: string | ||
default: "80" | ||
min_coverage: | ||
required: false | ||
type: number | ||
default: 100 | ||
runs_on: | ||
required: false | ||
type: string | ||
default: "ubuntu-latest" | ||
setup: | ||
required: false | ||
type: string | ||
default: "" | ||
test_optimization: | ||
required: false | ||
type: boolean | ||
default: true | ||
test_recursion: | ||
required: false | ||
type: boolean | ||
default: false | ||
working_directory: | ||
required: false | ||
type: string | ||
default: "." | ||
package_get_excludes: | ||
required: false | ||
type: string | ||
default: "!*" | ||
build_runner: | ||
required: false | ||
type: boolean | ||
default: true | ||
secrets: | ||
ssh_key: | ||
required: false | ||
|
||
jobs: | ||
build: | ||
defaults: | ||
run: | ||
working-directory: ${{inputs.working_directory}} | ||
|
||
runs-on: ${{inputs.runs_on}} | ||
|
||
steps: | ||
- name: 📚 Git Checkout | ||
uses: actions/checkout@v4 | ||
|
||
- name: 🐦 Setup Flutter | ||
uses: subosito/flutter-action@v2 | ||
with: | ||
flutter-version: ${{inputs.flutter_version}} | ||
channel: ${{inputs.flutter_channel}} | ||
cache: true | ||
cache-key: flutter-:os:-:channel:-:version:-:arch:-:hash:-${{ hashFiles('**/pubspec.lock') }} | ||
|
||
- name: 🤫 Set SSH Key | ||
env: | ||
ssh_key: ${{secrets.ssh_key}} | ||
if: env.ssh_key != null | ||
uses: webfactory/ssh-agent@v0.9.0 | ||
with: | ||
ssh-private-key: ${{secrets.ssh_key}} | ||
|
||
- name: 📦 Install Dependencies | ||
run: | | ||
flutter pub global activate very_good_cli | ||
very_good packages get --recursive --ignore=${{inputs.package_get_excludes}} | ||
- name: ⚙️ Run Setup | ||
if: "${{inputs.setup != ''}}" | ||
run: ${{inputs.setup}} | ||
|
||
- name: ✨ Check Formatting | ||
run: dart format --line-length ${{inputs.format_line_length}} --set-exit-if-changed ${{inputs.format_directories}} | ||
|
||
- name: 🎯 Setup Dart | ||
uses: dart-lang/setup-dart@v1 | ||
with: | ||
sdk: ${{inputs.dart_sdk}} | ||
|
||
- name: ⚙️ build with build_runner | ||
if: ${{inputs.build_runner}} | ||
run: dart run build_runner build --delete-conflicting-outputs | ||
|
||
- name: 🕵️ Analyze | ||
run: flutter analyze ${{inputs.analyze_directories}} | ||
|
||
- name: 🧪 Run Tests | ||
run: very_good test -j ${{inputs.concurrency}} ${{(inputs.test_recursion && '--recursive') || ''}} ${{(inputs.test_optimization && '--optimization') || '--no-optimization'}} --coverage --test-randomize-ordering-seed random | ||
|
||
- name: 📊 Check Code Coverage | ||
uses: VeryGoodOpenSource/very_good_coverage@v3 | ||
with: | ||
path: ${{inputs.working_directory}}/coverage/lcov.info | ||
exclude: ${{inputs.coverage_excludes}} | ||
min_coverage: ${{inputs.min_coverage}} |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
name: key_generator | ||
|
||
on: [ pull_request, push ] | ||
|
||
jobs: | ||
build: | ||
uses: TalaoDAO/AltMe/.github/workflows/flutter_package.yaml@main | ||
with: | ||
flutter_channel: stable | ||
flutter_version: 3.19.6 | ||
min_coverage: 30 | ||
working_directory: packages/key_generator | ||
dart_sdk: 3.3.4 | ||
build_runner: false |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
name: polygonid | ||
|
||
on: [ pull_request, push ] | ||
|
||
jobs: | ||
build: | ||
uses: TalaoDAO/AltMe/.github/workflows/flutter_package.yaml@main | ||
with: | ||
flutter_channel: stable | ||
flutter_version: 3.19.6 | ||
min_coverage: 30 | ||
working_directory: packages/polygonid | ||
dart_sdk: 3.3.4 | ||
build_runner: false |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
extension DoubleExtension on double { | ||
String decimalNumber(int n) { | ||
int number = 1; | ||
for (int i = 0; i < n; i++) { | ||
if (i > toString().split('.').toList().last.length) { | ||
break; | ||
} | ||
number *= 10; | ||
} | ||
|
||
final twoDecimalNumber = (this * number).floor() / number; | ||
return twoDecimalNumber.toString(); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,6 @@ | ||
export 'bigint_extension.dart'; | ||
export 'credential_status.dart'; | ||
export 'double_extension.dart'; | ||
export 'iterable_extension.dart'; | ||
export 'string_extension.dart'; | ||
export 'unit8List_extension.dart'; |
Oops, something went wrong.