Note default folder for githooks. #22
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: Lint Checks | |
# Always run the checks on a push to dev and a PR. | |
on: | |
push: | |
branches: | |
- dev | |
pull_request: | |
types: [opened, reopened, synchronize] | |
env: | |
FLUTTER_VERSION: '3.27.0' | |
jobs: | |
analyze: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: subosito/flutter-action@v2 | |
with: | |
channel: 'stable' | |
flutter-version: ${{env.FLUTTER_VERSION}} | |
- run: flutter pub get | |
- run: flutter analyze --fatal-infos | |
format: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: subosito/flutter-action@v2 | |
with: | |
channel: 'stable' | |
flutter-version: ${{env.FLUTTER_VERSION}} | |
- run: flutter pub get | |
- run: dart format --set-exit-if-changed . | |
markdown: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-node@v4 | |
with: | |
node-version: 18 | |
- run: npm install -g markdownlint-cli | |
- run: markdownlint assets/markdown | |
# -p .markdownlintignore -c .markdownlint.yaml | |
siidcm: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: subosito/flutter-action@v2 | |
with: | |
channel: 'stable' | |
flutter-version: ${{env.FLUTTER_VERSION}} | |
- run: flutter pub get | |
- run: dart run dart_code_metrics:metrics check-unnecessary-nullable --disable-sunset-warning lib | |
- run: dart run dart_code_metrics:metrics check-unused-code --disable-sunset-warning lib | |
- run: dart run dart_code_metrics:metrics check-unused-files --disable-sunset-warning lib | |
- run: dart run dart_code_metrics:metrics analyze --disable-sunset-warning --fatal-style lib --reporter=console | |
- run: find lib -type f -name '*.dart' ! -exec grep -qE '^(/// .*|/// Copyright|/// Licensed)' {} \; -print | xargs printf "\t%s\n" | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: subosito/flutter-action@v2 | |
with: | |
channel: 'stable' | |
flutter-version: ${{env.FLUTTER_VERSION}} | |
- run: sudo apt update | |
- run: sudo apt install -y clang cmake curl libgtk-3-dev ninja-build pkg-config unzip libunwind-dev libsecret-1-dev | |
- run: flutter pub get | |
- run: flutter build linux -v |