diff --git a/.github/workflows/pana.yaml b/.github/workflows/pana.yaml index eea52f1..ea2b19d 100644 --- a/.github/workflows/pana.yaml +++ b/.github/workflows/pana.yaml @@ -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 diff --git a/.idea/runConfigurations/melos_run_analyze.xml b/.idea/runConfigurations/melos_run_analyze.xml deleted file mode 100644 index 4287f1c..0000000 --- a/.idea/runConfigurations/melos_run_analyze.xml +++ /dev/null @@ -1,11 +0,0 @@ - - - - - diff --git a/melos.yaml b/melos.yaml index bbdff89..aeb9710 100644 --- a/melos.yaml +++ b/melos.yaml @@ -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. @@ -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 diff --git a/packages/athena_migrate/pubspec.yaml b/packages/athena_migrate/pubspec.yaml index 2eccbe2..b3181b1 100644 --- a/packages/athena_migrate/pubspec.yaml +++ b/packages/athena_migrate/pubspec.yaml @@ -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: \ No newline at end of file diff --git a/packages/athena_mysql/pubspec.yaml b/packages/athena_mysql/pubspec.yaml index 06dd938..c683372 100644 --- a/packages/athena_mysql/pubspec.yaml +++ b/packages/athena_mysql/pubspec.yaml @@ -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 diff --git a/packages/athena_postgres/pubspec.yaml b/packages/athena_postgres/pubspec.yaml index beb54ae..30d5c4b 100644 --- a/packages/athena_postgres/pubspec.yaml +++ b/packages/athena_postgres/pubspec.yaml @@ -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 diff --git a/packages/athena_sql/pubspec.yaml b/packages/athena_sql/pubspec.yaml index f2620b0..a82701e 100644 --- a/packages/athena_sql/pubspec.yaml +++ b/packages/athena_sql/pubspec.yaml @@ -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: diff --git a/packages/athena_utils/pubspec.yaml b/packages/athena_utils/pubspec.yaml index 19afa6c..09c6d42 100644 --- a/packages/athena_utils/pubspec.yaml +++ b/packages/athena_utils/pubspec.yaml @@ -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