Improve main workflow

pull/1449/head
Ahmed Hnewa 2 years ago
parent 3a82930bbe
commit 98e4dade9f
No known key found for this signature in database
GPG Key ID: C488CC70BBCEF0D1
  1. 2
      .github/PULL_REQUEST_TEMPLATE.md
  2. 27
      .github/workflows/main.yml
  3. 4
      before-push.sh

@ -43,4 +43,4 @@ Closes #IssueNumber
- [ ] I have run `dart format .`` on the project <!-- REQUIRED --> - [ ] I have run `dart format .`` on the project <!-- REQUIRED -->
- [ ] I have run `dart fix --apply` on the project <!-- REQUIRED --> - [ ] I have run `dart fix --apply` on the project <!-- REQUIRED -->
- [ ] I have run `flutter test` and `flutter analyze` and it passed successfully <!-- REQUIRED --> - [ ] I have run `flutter test` and `flutter analyze` and it passed successfully <!-- REQUIRED -->
- [ ] I have run `./before-push.sh` and everything is fine <!-- Optional > - [ ] I have run `./before-push.sh` and everything is fine <!-- Optional -->

@ -15,9 +15,24 @@ jobs:
- uses: subosito/flutter-action@v2 - uses: subosito/flutter-action@v2
with: with:
channel: 'stable' channel: 'stable'
- run: flutter --version
- run: flutter pub get - name: Check flutter version
- run: flutter pub get -C flutter_quill_extensions run: flutter --version
- run: flutter analyze
- run: flutter test - name: Install dependencies
- run: flutter pub publish --dry-run run: flutter pub get
- name: Install flutter_quill_extensions dependencies
run: flutter pub get -C flutter_quill_extensions
- name: Run flutter analysis
run: flutter analyze
- name: Check dart code formatting
run: dart format --set-exit-if-changed .
- name: Check if package is ready for publishing
run: flutter pub publish --dry-run
- name: Run flutter tests
run: flutter test

@ -20,4 +20,8 @@ dart fix --apply
echo "Running 'dart format .'" echo "Running 'dart format .'"
dart format . dart format .
# Check dart code formatting
echo "Running `dart format --set-exit-if-changed .`"
dart format --set-exit-if-changed .
echo "Script completed." echo "Script completed."

Loading…
Cancel
Save