Skip to content

Commit

Permalink
tighten
Browse files Browse the repository at this point in the history
  • Loading branch information
davidlondono committed Nov 29, 2024
1 parent 19cc633 commit 09482a5
Show file tree
Hide file tree
Showing 8 changed files with 29 additions and 117 deletions.
100 changes: 15 additions & 85 deletions .github/workflows/pana.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,102 +20,32 @@ concurrency:
cancel-in-progress: true

jobs:
athena_migrate:
package_panas:
runs-on: ubuntu-latest
strategy:
matrix:
pkg: [athena_migrate, athena_mysql, athena_postgres, athena_sql, athena_utils]
fail-fast: false
steps:
- uses: actions/checkout@v3
- name: Activate Melos
run: dart pub global activate melos
- name: Install Dependencies
run: melos bs
- uses: flutterings/dart-package-analyzer@v1
# set an id for the current step
id: analysis
with:
flutter_version: '3.24.5'
relativePath: packages/athena_migrate
- name: Check scores
env:
# NB: "analysis" is the id set above. Replace it with the one you used if different.
TOTAL: ${{ steps.analysis.outputs.total }}
TOTAL_MAX: ${{ steps.analysis.outputs.total_max }}
run: |
if (( $TOTAL < 100 ))
then
echo Score too low!
exit 1
fi
athena_mysql:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: flutterings/dart-package-analyzer@v1
id: analysis
with:
flutter_version: '3.24.5'
relativePath: packages/athena_mysql
- name: Check scores
env:
# NB: "analysis" is the id set above. Replace it with the one you used if different.
TOTAL: ${{ steps.analysis.outputs.total }}
TOTAL_MAX: ${{ steps.analysis.outputs.total_max }}
run: |
if (( $TOTAL < 100 ))
then
echo Score too low!
exit 1
fi
athena_postgres:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: flutterings/dart-package-analyzer@v1
id: analysis
with:
flutter_version: '3.24.5'
relativePath: packages/athena_postgres
- name: Check scores
env:
# NB: "analysis" is the id set above. Replace it with the one you used if different.
TOTAL: ${{ steps.analysis.outputs.total }}
TOTAL_MAX: ${{ steps.analysis.outputs.total_max }}
run: |
if (( $TOTAL < 100 ))
then
echo Score too low!
exit 1
fi
athena_sql:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: flutterings/dart-package-analyzer@v1
id: analysis
with:
flutter_version: '3.24.5'
relativePath: packages/athena_sql
- name: Check scores
env:
# NB: "analysis" is the id set above. Replace it with the one you used if different.
TOTAL: ${{ steps.analysis.outputs.total }}
TOTAL_MAX: ${{ steps.analysis.outputs.total_max }}
run: |
if (( $TOTAL < 100 ))
then
echo Score too low!
exit 1
fi
athena_utils:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: flutterings/dart-package-analyzer@v1
id: analysis
with:
flutter_version: '3.24.5'
relativePath: packages/athena_utils

# You can then use this id to retrieve the outputs in the next steps.
# The following step shows how to exit the workflow with an error if the total score in percentage is below 50:
- name: Check scores
env:
# NB: "analysis" is the id set above. Replace it with the one you used if different.
TOTAL: ${{ steps.analysis.outputs.total }}
TOTAL_MAX: ${{ steps.analysis.outputs.total_max }}
run: |
if (( $TOTAL < 100 ))
PERCENTAGE=$(( $TOTAL * 100 / $TOTAL_MAX ))
if (( $PERCENTAGE < 50 ))
then
echo Score too low!
exit 1
Expand Down
11 changes: 0 additions & 11 deletions .idea/runConfigurations/melos_run_analyze.xml

This file was deleted.

11 changes: 2 additions & 9 deletions melos.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,6 @@ scripts:
lint:all:
run: melos run analyze && melos run format
description: Run all static analysis checks.
analyze:
# We are setting the concurrency to 1 because a higher concurrency can crash
# the analysis server on low performance machines (like GitHub Actions).
run: |
melos exec -c 1 -- \
dart analyze . --fatal-infos
description: |
Run `dart analyze` in all packages.
- Note: you can also rely on your IDEs Dart Analysis / Issues window.
test:coverage:
run: dart pub global run coverage:test_with_coverage -b -f -- -j 1
description: Run test with coverage.
Expand All @@ -26,3 +17,5 @@ scripts:
dirExists: test
cache-source:
run: melos exec -- "mkdir -p '$PUB_CACHE/hosted/pub.dev/\$MELOS_PACKAGE_NAME-\$MELOS_PACKAGE_VERSION' && cp -rf '\$MELOS_PACKAGE_PATH'/* '$PUB_CACHE/hosted/pub.dev/\$MELOS_PACKAGE_NAME-\$MELOS_PACKAGE_VERSION'"
tighten:
exec: dart pub upgrade --tighten
8 changes: 4 additions & 4 deletions packages/athena_migrate/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,17 +8,17 @@ environment:
sdk: '>=3.0.0 <4.0.0'

dev_dependencies:
build_runner: ^2.3.0
build_runner: ^2.4.13
lints: ^5.0.0
mockito: ^5.4.0
test: ^1.21.0
mockito: ^5.4.4
test: ^1.25.9
dependencies:
args: ^2.6.0
intl: ^0.20.1
path: ^1.9.1
yaml: ^3.1.2
athena_utils: ^1.0.4
collection: any
collection: ^1.19.1
clock: ^1.1.2
executables:
athena_migrate:
6 changes: 3 additions & 3 deletions packages/athena_mysql/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@ environment:
dependencies:
athena_sql: ^1.1.8
mysql_client: ^0.0.27
path: ^1.8.3
path: ^1.9.1

dev_dependencies:
docker_process: ^1.3.1
docker_process: ^1.3.2
lints: ^5.0.0
test: ^1.21.0
test: ^1.25.9
6 changes: 3 additions & 3 deletions packages/athena_postgres/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,10 @@ environment:

dependencies:
athena_sql: ^1.1.8
path: ^1.8.3
path: ^1.9.1
postgres: ^3.4.4

dev_dependencies:
docker_process: ^1.3.1
docker_process: ^1.3.2
lints: ^5.0.0
test: ^1.21.0
test: ^1.25.9
2 changes: 1 addition & 1 deletion packages/athena_sql/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ environment:
sdk: '>=3.0.0 <4.0.0'

dependencies:
collection: any
collection: ^1.19.1
athena_utils: ^1.0.4

dev_dependencies:
Expand Down
2 changes: 1 addition & 1 deletion packages/athena_utils/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ environment:

dev_dependencies:
lints: ^5.0.0
test: ^1.21.0
test: ^1.25.9
dependencies:
file: ^7.0.1
meta: ^1.16.0
Expand Down

0 comments on commit 09482a5

Please sign in to comment.