Add CI checks for dart / flutter

This commit is contained in:
ok300
2023-11-03 12:54:12 +01:00
parent 77f152273d
commit 30c08b053d
3 changed files with 69 additions and 44 deletions

View File

@@ -23,6 +23,7 @@ jobs:
- name: Checkout repo
uses: actions/checkout@v3
# Set up Rust environment and run checks
- name: Install rust
run: |
rustup set auto-self-update disable
@@ -40,3 +41,19 @@ jobs:
# Explicitly allow clippy::dead_code lint because the functions aren't called in the docs snippets
# Explicitly allow clippy::unused_variables because snippets might have to demonstrate how to get certain variables without using them afterward
cargo clippy -- --allow dead_code --allow unused_variables --deny warnings
# Set up the flutter environment and run checks
- uses: subosito/flutter-action@v2
with:
flutter-version: '3.13.9'
channel: 'stable'
- name: pub-get
run: |
cd snippets/dart_snippets
flutter pub get
- name: dart-analyze
run: |
cd snippets/dart_snippets
dart analyze --fatal-infos