Resolve #445 #578
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Flutter Analysis | |
on: [pull_request, workflow_dispatch] | |
jobs: | |
package-analysis: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Install Flutter | |
uses: subosito/flutter-action@v2 | |
with: | |
channel: stable | |
- name: Install dependencies | |
run: flutter pub get | |
- uses: actions/checkout@v3 | |
- name: Set up git | |
run: | | |
git config user.name "GitHub Actions Bot" | |
git config user.email "<>" | |
- name: Format code | |
run: | | |
dart format . | |
if [ $? -eq 1 ]; then | |
git add . | |
git commit -m "chore: formatting corrections" | |
git push | |
echo "Code has been formatted and changes have been committed and pushed." | |
fi | |
echo "All code is properly formatted!" | |
- name: Analyze code | |
run: flutter analyze --fatal-infos . |