diff --git a/.github/workflows/health.yml b/.github/workflows/health.yml index 0f80a3c..95ef341 100644 --- a/.github/workflows/health.yml +++ b/.github/workflows/health.yml @@ -1,35 +1,34 @@ -#The name of your workflow. -name: check -# Trigger the workflow on push or pull request +name: health on: push: branches: - main - - dev pull_request: branches: - main - - dev jobs: health: runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 + - uses: subosito/flutter-action@v2 with: channel: "stable" - flutter-version: "3.7.7" - - name: Activate melos latest and bootstrap - run: flutter pub global activate melos && melos bs - - name: run the builder runner - run: melos run build - - name: check format - run: melos run format - - name: check lint - run: melos run analyze - - name: check test coverage - run: melos run test_coverage + - name: Setup Melos + uses: bluefireteam/melos-action@v2 + with: + version: "4.0.0" + + - name: check code formatting + run: melos exec dart format --set-exit-if-changed . + + - name: check code analysis + run: melos exec dart analyze . --fatal-infos + + - name: run unit tests + run: melos test - name: test coverage (readable) uses: VeryGoodOpenSource/very_good_coverage@v2 @@ -40,4 +39,4 @@ jobs: uses: VeryGoodOpenSource/very_good_coverage@v2 with: path: "packages/flutter_readable/coverage/lcov.info" - min_coverage: 83 \ No newline at end of file + min_coverage: 100 diff --git a/melos.yaml b/melos.yaml index 0dd97a6..44ec82d 100644 --- a/melos.yaml +++ b/melos.yaml @@ -7,21 +7,7 @@ command: bootstrap: runPubGetInParallel: false scripts: - lint: - run: melos run format && melos run analyze - - analyze: - run: | - melos exec -c 1 -- \ - dart analyze . --fatal-infos - format: - run: melos exec -c 1 -- \ - flutter format . test: run: | melos exec -c 1 --dir-exists="test" --ignore="*example*" --fail-fast -- \ - "flutter test" - test_coverage: - run: | - melos exec -c 1 --dir-exists="test" --fail-fast -- \ - "flutter test --coverage " + "flutter test --coverage"