新增 CI:自动 analyze/test(含 example)
Flutter CI / analyze-and-test (push) Waiting to run Details

This commit is contained in:
Max 2026-01-27 15:43:08 +08:00
parent 6843d5ab5c
commit d58eeede2f
1 changed files with 46 additions and 0 deletions

46
.github/workflows/ci.yml vendored Normal file
View File

@ -0,0 +1,46 @@
name: Flutter CI
on:
push:
branches:
- main
pull_request:
branches:
- main
jobs:
analyze-and-test:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Flutter
uses: subosito/flutter-action@v2
with:
channel: stable
- name: Flutter Version
run: flutter --version
- name: Pub Get (root)
run: flutter pub get
- name: Analyze (root)
run: flutter analyze
- name: Test (root)
run: flutter test --coverage
- name: Pub Get (example)
run: flutter pub get
working-directory: example
- name: Analyze (example)
run: flutter analyze
working-directory: example
- name: Test (example)
run: flutter test
working-directory: example