From 85d3ef0ebeb35dc8e2e3b888f85205854878e47c Mon Sep 17 00:00:00 2001 From: Lucas Oliveira <62367544+tilucasoli@users.noreply.github.com> Date: Wed, 24 Jul 2024 12:46:03 -0300 Subject: [PATCH 1/8] refactor pipelines --- .github/actions/fvm/action.yml | 31 +++++++++++++++++++++ .github/actions/test/action.yml | 34 +++++++++++------------ .github/workflows/analyze.yml | 49 +++++++++++++++++++++++++++++++++ 3 files changed, 97 insertions(+), 17 deletions(-) create mode 100644 .github/actions/fvm/action.yml create mode 100644 .github/workflows/analyze.yml diff --git a/.github/actions/fvm/action.yml b/.github/actions/fvm/action.yml new file mode 100644 index 000000000..15018e44a --- /dev/null +++ b/.github/actions/fvm/action.yml @@ -0,0 +1,31 @@ +name: "Setup FVM" +description: "Install and setup FVM" + +inputs: + flutter-version: + description: 'Flutter version' + required: false + default: "" + +runs: + using: "composite" + steps: + - name: Install FVM + shell: bash + run: | + curl -fsSL https://fvm.app/install.sh | bash + fvm use ${{ inputs.flutter-version }} --force + + + - uses: kuhnroyal/flutter-fvm-config-action@v2 + id: fvm-config-action + + - uses: subosito/flutter-action@v2 + with: + flutter-version: ${{ steps.fvm-config-action.outputs.FLUTTER_VERSION }} + channel: ${{ steps.fvm-config-action.outputs.FLUTTER_CHANNEL }} + + - name: Flutter version + shell: bash + run: flutter --version + \ No newline at end of file diff --git a/.github/actions/test/action.yml b/.github/actions/test/action.yml index 3edd93075..63b99bf3c 100644 --- a/.github/actions/test/action.yml +++ b/.github/actions/test/action.yml @@ -54,24 +54,24 @@ runs: run: melos run test shell: bash - - name: Install DCM - if: ${{ inputs.run-dcm }} - uses: CQLabs/setup-dcm@v1 - with: - github_token: ${{ inputs.token }} - folders: packages/*/lib + # - name: Install DCM + # if: ${{ inputs.run-dcm }} + # uses: CQLabs/setup-dcm@v1 + # with: + # github_token: ${{ inputs.token }} + # folders: packages/*/lib - - name: Run DCM - if: ${{ inputs.run-dcm }} - uses: CQLabs/dcm-action@v1 - with: - github_token: ${{ inputs.token }} - ci_key: oss - email: oss - folders: . - fatal_style: true - fatal_performance: true - fatal_warnings: true + # - name: Run DCM + # if: ${{ inputs.run-dcm }} + # uses: CQLabs/dcm-action@v1 + # with: + # github_token: ${{ inputs.token }} + # ci_key: oss + # email: oss + # folders: . + # fatal_style: true + # fatal_performance: true + # fatal_warnings: true - name: Run fixes run: melos run fix diff --git a/.github/workflows/analyze.yml b/.github/workflows/analyze.yml new file mode 100644 index 000000000..5b685da3f --- /dev/null +++ b/.github/workflows/analyze.yml @@ -0,0 +1,49 @@ +name: Analyze Workflow + +on: + push: + pull_request_target: + branches: [main] + paths-ignore: + - 'scripts/**' + - 'website/**' + - 'assets/**' + +jobs: + dcm: + name: DCM + runs-on: ubuntu-latest + steps: + - name: Checkout mix repo + uses: actions/checkout@v4 + + - name: Setup FVM + uses: ./.github/actions/fvm/ + + - name: Setup Melos + uses: bluefireteam/melos-action@v3 + + - name: Run build runner + shell: bash + run: melos run brb + + - name: Install DCM + if: ${{ inputs.run-dcm }} + uses: CQLabs/setup-dcm@v1 + with: + github_token: ${{ secrets.GITHUB_TOKEN }} + folders: packages/*/lib + ci_key: oss + email: oss + fatal_style: true + fatal_performance: true + fatal_warnings: true + + - name: dart analyze + run: melos run --no-select analyze + shell: bash + + - name: Run custom_lint + run: melos run custom_lint_analyze + shell: bash + \ No newline at end of file From 62f510d00ab8d96906d48e89e6aaca05f53942e0 Mon Sep 17 00:00:00 2001 From: Lucas Oliveira <62367544+tilucasoli@users.noreply.github.com> Date: Wed, 24 Jul 2024 12:49:00 -0300 Subject: [PATCH 2/8] Update analyze.yml --- .github/workflows/analyze.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/analyze.yml b/.github/workflows/analyze.yml index 5b685da3f..5e5705e73 100644 --- a/.github/workflows/analyze.yml +++ b/.github/workflows/analyze.yml @@ -28,7 +28,6 @@ jobs: run: melos run brb - name: Install DCM - if: ${{ inputs.run-dcm }} uses: CQLabs/setup-dcm@v1 with: github_token: ${{ secrets.GITHUB_TOKEN }} From d5d2502a9e493e0003ace40c7a50ddaeac641141 Mon Sep 17 00:00:00 2001 From: Lucas Oliveira <62367544+tilucasoli@users.noreply.github.com> Date: Wed, 24 Jul 2024 12:55:34 -0300 Subject: [PATCH 3/8] Update analyze.yml --- .github/workflows/analyze.yml | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/.github/workflows/analyze.yml b/.github/workflows/analyze.yml index 5e5705e73..14d0a811b 100644 --- a/.github/workflows/analyze.yml +++ b/.github/workflows/analyze.yml @@ -29,6 +29,11 @@ jobs: - name: Install DCM uses: CQLabs/setup-dcm@v1 + with: + github_token: ${{ inputs.token }} + + - name: Run DCM + uses: CQLabs/dcm-action@v1 with: github_token: ${{ secrets.GITHUB_TOKEN }} folders: packages/*/lib @@ -39,7 +44,7 @@ jobs: fatal_warnings: true - name: dart analyze - run: melos run --no-select analyze + run: melos analyze shell: bash - name: Run custom_lint From 3484148b637b390714e62f307037754e797a4a52 Mon Sep 17 00:00:00 2001 From: Lucas Oliveira <62367544+tilucasoli@users.noreply.github.com> Date: Wed, 24 Jul 2024 12:58:55 -0300 Subject: [PATCH 4/8] Update analyze.yml --- .github/workflows/analyze.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/analyze.yml b/.github/workflows/analyze.yml index 14d0a811b..7db499aa8 100644 --- a/.github/workflows/analyze.yml +++ b/.github/workflows/analyze.yml @@ -30,7 +30,7 @@ jobs: - name: Install DCM uses: CQLabs/setup-dcm@v1 with: - github_token: ${{ inputs.token }} + github_token: ${{ secrets.GITHUB_TOKEN }} - name: Run DCM uses: CQLabs/dcm-action@v1 From bef3ff0ea71722a7bcb7ed1700bb77cb9bf82f03 Mon Sep 17 00:00:00 2001 From: Lucas Oliveira <62367544+tilucasoli@users.noreply.github.com> Date: Wed, 24 Jul 2024 13:09:17 -0300 Subject: [PATCH 5/8] Update analyze.yml --- .github/workflows/analyze.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/analyze.yml b/.github/workflows/analyze.yml index 7db499aa8..c7cd42514 100644 --- a/.github/workflows/analyze.yml +++ b/.github/workflows/analyze.yml @@ -19,6 +19,8 @@ jobs: - name: Setup FVM uses: ./.github/actions/fvm/ + with: + flutter-version: 'stable' - name: Setup Melos uses: bluefireteam/melos-action@v3 From 2faca71f827652bd2377acb60404a335257251db Mon Sep 17 00:00:00 2001 From: Lucas Oliveira <62367544+tilucasoli@users.noreply.github.com> Date: Wed, 24 Jul 2024 15:44:53 -0300 Subject: [PATCH 6/8] test to fix pipeline --- .github/workflows/analyze.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/analyze.yml b/.github/workflows/analyze.yml index c7cd42514..6a35c05c3 100644 --- a/.github/workflows/analyze.yml +++ b/.github/workflows/analyze.yml @@ -38,7 +38,7 @@ jobs: uses: CQLabs/dcm-action@v1 with: github_token: ${{ secrets.GITHUB_TOKEN }} - folders: packages/*/lib + folders: . ci_key: oss email: oss fatal_style: true From b66af029852636b89d919d8d4b46d5c99a6d01c1 Mon Sep 17 00:00:00 2001 From: Lucas Oliveira <62367544+tilucasoli@users.noreply.github.com> Date: Wed, 24 Jul 2024 15:54:28 -0300 Subject: [PATCH 7/8] Update align_widget_modifier.dart --- packages/mix/lib/src/modifiers/align_widget_modifier.dart | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/mix/lib/src/modifiers/align_widget_modifier.dart b/packages/mix/lib/src/modifiers/align_widget_modifier.dart index 83e8c3bc4..02e5dd4cc 100644 --- a/packages/mix/lib/src/modifiers/align_widget_modifier.dart +++ b/packages/mix/lib/src/modifiers/align_widget_modifier.dart @@ -25,9 +25,9 @@ final class AlignModifierSpec extends WidgetModifierSpec { @override AlignModifierSpec lerp(AlignModifierSpec? other, double t) { return AlignModifierSpec( - alignment: AlignmentGeometry.lerp(alignment, other?.alignment, t), widthFactor: lerpDouble(widthFactor, other?.widthFactor, t), heightFactor: lerpDouble(heightFactor, other?.heightFactor, t), + alignment: AlignmentGeometry.lerp(alignment, other?.alignment, t), ); } From dc02711d8217a9956c7009c6a5d1de325c3620f2 Mon Sep 17 00:00:00 2001 From: Lucas Oliveira <62367544+tilucasoli@users.noreply.github.com> Date: Wed, 24 Jul 2024 16:03:25 -0300 Subject: [PATCH 8/8] Revert "Update align_widget_modifier.dart" This reverts commit b66af029852636b89d919d8d4b46d5c99a6d01c1. --- packages/mix/lib/src/modifiers/align_widget_modifier.dart | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/mix/lib/src/modifiers/align_widget_modifier.dart b/packages/mix/lib/src/modifiers/align_widget_modifier.dart index 02e5dd4cc..83e8c3bc4 100644 --- a/packages/mix/lib/src/modifiers/align_widget_modifier.dart +++ b/packages/mix/lib/src/modifiers/align_widget_modifier.dart @@ -25,9 +25,9 @@ final class AlignModifierSpec extends WidgetModifierSpec { @override AlignModifierSpec lerp(AlignModifierSpec? other, double t) { return AlignModifierSpec( + alignment: AlignmentGeometry.lerp(alignment, other?.alignment, t), widthFactor: lerpDouble(widthFactor, other?.widthFactor, t), heightFactor: lerpDouble(heightFactor, other?.heightFactor, t), - alignment: AlignmentGeometry.lerp(alignment, other?.alignment, t), ); }