new version: 1.0.1 #5
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: CI | |
on: | |
push: | |
branches: | |
- master | |
pull_request: | |
branches: | |
- master | |
jobs: | |
analyze-and-test: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v3 | |
- name: Cache Flutter SDK | |
uses: actions/cache@v3 | |
with: | |
path: ~/.pub-cache | |
key: ${{ runner.os }}-flutter-${{ hashFiles('**/pubspec.yaml') }} | |
restore-keys: | | |
${{ runner.os }}-flutter- | |
- name: Set up Flutter | |
uses: subosito/flutter-action@v2 | |
with: | |
flutter-version: '3.27.2' | |
- name: Install dependencies | |
run: flutter pub get | |
- name: Cache pub packages | |
uses: actions/cache@v3 | |
with: | |
path: ~/.pub-cache | |
key: ${{ runner.os }}-pub-${{ hashFiles('**/pubspec.lock') }} | |
restore-keys: | | |
${{ runner.os }}-pub- | |
- name: Flutter version | |
run: flutter --version | |
- name: Analyze code | |
run: flutter analyze | |
- name: Run tests | |
run: flutter test | |