Added lint testing to gitea action!!

Reviewed-on: tom/rluv-client#2
This commit is contained in:
2023-08-17 15:16:08 -06:00
parent a84844a314
commit c54110409a
13 changed files with 88 additions and 324 deletions
+19 -15
View File
@@ -21,23 +21,27 @@ jobs:
# filters: |
# mobile:
# - added|modified: 'mobile/**'
- name: Install Flutter SDK
# if: steps.filter.outputs.mobile == 'true'
uses: subosito/flutter-action@v2
with:
flutter-version: '3.10.6'
channel: 'stable'
- name: Lint Mobile Flutter Files
- name: Install Deps
run: |
apt-get update
apt-get --yes --force-yes install jq unzip
- name: Install Flutter SDK and Lint
# if: steps.filter.outputs.mobile == 'true'
run: |
echo 'Analyzing flutter files'
flutter pub get
echo 'Generating model files...'
dart run build_runner build
echo 'Analyzing...'
flutter analyze --no-fatal-infos --no-fatal-warnings > mobile_lint.txt
export MOBILE=$(cat mobile_lint.txt | grep -o 'No issues found' | wc -l | xargs)
if [[ $MOBILE == 0 ]]; then echo 'Flutter Linting failed with' && cat mobile_lint.txt | tail -n 15 && echo '...' && exit 1; fi
echo 'Downloading sdk...'
cd ..
git clone -b stable --single-branch https://github.com/flutter/flutter.git
echo 'Adding flutter to path:'
export PATH="$PATH:`pwd`/flutter/bin"
cd rluv-client
flutter doctor
echo 'Generating model files...'
dart run build_runner build
echo 'Analyzing...'
flutter analyze --no-fatal-infos --no-fatal-warnings > mobile_lint.txt
export MOBILE=$(cat mobile_lint.txt | grep -o 'No issues found' | wc -l | xargs)
if [[ $MOBILE == 0 ]]; then echo 'Flutter Linting failed with' && cat mobile_lint.txt | tail -n 15 && echo '...' && exit 1; fi
# lint-busypay:
# runs-on: ubuntu-latest