Jess/fixed import issues #220
Workflow file for this run
This file contains hidden or 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.32.5' | |
| 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 . | |
| import_order: | |
| 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 custom_lint | |
| 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 | |
| copyright: | |
| 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 | |
| - name: Check copyright headers | |
| run: | | |
| # Find Dart files without proper copyright headers, excluding generated files | |
| missing_copyright=$(find lib -type f -name '*.dart' \ | |
| ! -name '*.g.dart' \ | |
| ! -name '*.gr.dart' \ | |
| ! -name '*.freezed.dart' \ | |
| ! -name '*.chopper.dart' \ | |
| ! -name '*.part.dart' \ | |
| ! -name '*.config.dart' \ | |
| -exec grep -L "Copyright" {} \;) | |
| if [ -n "$missing_copyright" ]; then | |
| echo "❌ Files missing copyright headers:" | |
| echo "$missing_copyright" | |
| echo "" | |
| echo "💡 Note: Generated files (*.g.dart, *.freezed.dart, etc.) are automatically excluded" | |
| exit 1 | |
| else | |
| echo "✅ All non-generated Dart files have copyright headers" | |
| fi | |
| 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-get install -y clang cmake curl libgtk-3-dev ninja-build pkg-config unzip libunwind-dev libsecret-1-dev | |
| - run: sudo apt-get install -y libgstreamer1.0-dev libgstreamer-plugins-base1.0-dev libgstreamer-plugins-bad1.0-dev gstreamer1.0-plugins-base gstreamer1.0-plugins-good gstreamer1.0-plugins-bad gstreamer1.0-plugins-ugly gstreamer1.0-libav gstreamer1.0-tools gstreamer1.0-x gstreamer1.0-alsa gstreamer1.0-gl gstreamer1.0-gtk3 gstreamer1.0-qt5 gstreamer1.0-pulseaudio | |
| - run: flutter pub get | |
| - run: flutter build linux -v |