Skip to content
This repository has been archived by the owner on Jul 12, 2024. It is now read-only.

Add GitHub Actions workflow for code quality checks #19

Merged
merged 6 commits into from
Jun 20, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
46 changes: 46 additions & 0 deletions .github/workflows/code_quality_checks.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
name: Flutter Code Quality Checks

on:
push:
branches:
- main
pull_request:

jobs:
format_and_analyze:
name: Run Dart Format and Flutter Analyze
runs-on: ubuntu-latest

steps:
- name: Checkout repository
uses: actions/checkout@v3

- name: Set up Flutter
uses: subosito/flutter-action@v2
with:
flutter-version: "3.22.0"

- name: Disable Flutter analytics
run: flutter config --no-analytics

- name: Copy .env.sample to .env
run: cp .env.sample .env

- name: Install dependencies
run: flutter pub get

- name: Check Dart code formatting
id: dart_format
run: dart format --output none --set-exit-if-changed .

- name: Analyze Flutter code
id: flutter_analyze
run: flutter analyze

- name: Post formatting error message
if: failure()
run: echo "Dart code formatting issues detected. Please run 'dart format .' and commit the changes."

- name: Post analyze error message
if: failure()
run: echo "Flutter analysis issues detected. Please fix the reported issues."
4 changes: 2 additions & 2 deletions SECURITY.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@ The following versions of our project are currently being supported with securit

| Version | Supported |
| -------------- | ------------------ |
| Flutter 3.x.x | :white_check_mark: |
| Flutter 3.22.x | :white_check_mark: |
| Flutter < 3.0 | :x: |
| Dart 3.x.x | :white_check_mark: |
| Dart < 3.0 | :x: |
| Dart < 3.4 | :x: |
| DevTools 2.x.x | :white_check_mark: |
| DevTools < 2.0 | :x: |

Expand Down
Loading