Skip to content

Commit

Permalink
chore(ci): update verify workflow to use dcm for analysis (#242)
Browse files Browse the repository at this point in the history
* chore(ci): update verify workflow to use dcm for analysis

* fix: update hero tag in example's fab

* fix: update print statements for clarity in currencies example

* fix(ci): adjust permissions for build directory in verify workflow

* fix(ci): update permissions setup for build directory in verify workflow

* fix(ci): increase minimum pub points requirement in verify workflow

* fix(ci): enhance dcm analysis with additional flags
  • Loading branch information
tsinis authored Oct 22, 2024
1 parent 6d4c7ba commit 8f30718
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 8 deletions.
14 changes: 10 additions & 4 deletions .github/workflows/verify_package_workflow.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -70,14 +70,20 @@ jobs:
uses: fujidaiti/[email protected]
with:
report: ${{ steps.analysis.outputs.json_output }}
min-pub-points: 130
min-pub-points: 150

- name: 🛂 Set up file system write permissions
run: sudo chown -R runner:runner $(pwd) && sudo chmod -R 777 $(pwd)
- name: 📥 Install DCM
if: ${{ github.event_name == 'pull_request' }}
uses: CQLabs/[email protected]
with:
github_token: ${{ secrets.GITHUB_TOKEN }}

- name: 🔎 Dart Code Metrics
if: ${{ github.event_name == 'pull_request' }}
run: dart run dart_code_linter:metrics --fatal-style --fatal-performance --fatal-warnings -r github lib
run: dcm analyze . --congratulate --fatal-style --fatal-warnings --reporter=github

- name: 🛂 Set up file system write permissions
run: sudo chown -R runner:runner $(pwd) && sudo chmod -R 777 $(pwd)

- name: 🧪 Run Dart tests
if: ${{ !inputs.is_flutter }}
Expand Down
6 changes: 3 additions & 3 deletions packages/sealed_currencies/example/lib/main.dart
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,9 @@ void main() {
subunitToUnit: 100, unitFirst: true), translations: eurCurrencyTranslations".
*/

print(isVikingKrone(const FiatNok())); // Prints "true".
print(isVikingKrone(serbianDinar)); // Prints "null".
print(isVikingKrone(const FiatCzk())); // Prints "false".
print(isVikingKrone(const FiatNok())); // Prints true.
print(isVikingKrone(serbianDinar)); // Prints null.
print(isVikingKrone(const FiatCzk())); // Prints false.

FiatCurrency.list
.where((currency) => currency.symbol?.contains("kr") ?? false)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ class FloatingButton extends StatelessWidget {
onLongPress: () => onPressed(isLong: true),
// ignore: prefer-action-button-tooltip, we need long-press here.
child: FloatingActionButton(
heroTag: "fab",
heroTag: "FAB",
onPressed: () => onPressed(isLong: false),
child: AnimatedBuilder(
animation: controller,
Expand Down

0 comments on commit 8f30718

Please sign in to comment.