Skip to content

Commit

Permalink
chore: update health checks
Browse files Browse the repository at this point in the history
  • Loading branch information
maxzod committed Mar 3, 2024
1 parent 5439f30 commit f82ecc2
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 32 deletions.
33 changes: 16 additions & 17 deletions .github/workflows/health.yml
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -40,4 +39,4 @@ jobs:
uses: VeryGoodOpenSource/very_good_coverage@v2
with:
path: "packages/flutter_readable/coverage/lcov.info"
min_coverage: 83
min_coverage: 100
16 changes: 1 addition & 15 deletions melos.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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"

0 comments on commit f82ecc2

Please sign in to comment.