Merge pull request #35 from Xazin/chore/0.4.0-version #59
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: CI | |
| on: | |
| push: | |
| branches: [main] | |
| paths: | |
| - ".github/workflows/ci.yaml" | |
| - "lib/**" | |
| - "test/**" | |
| - "analysis_options.yaml" | |
| - "pubspec.yaml" | |
| pull_request: | |
| types: [opened, synchronize] | |
| workflow_dispatch: | |
| env: | |
| flutter_version: "3.29.0" | |
| flutter_channel: "stable" | |
| jobs: | |
| analyze: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Fetch code from repository | |
| uses: actions/checkout@v4 | |
| - name: Setup Flutter | |
| uses: subosito/flutter-action@v2 | |
| with: | |
| channel: ${{ env.flutter_channel }} | |
| flutter-version: ${{ env.flutter_version }} | |
| - name: Get Flutter dependencies | |
| run: flutter pub get | |
| - name: Check formatting | |
| run: dart format --set-exit-if-changed . | |
| - name: Run analyze | |
| run: flutter analyze . | |
| test: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| - name: Setup Flutter | |
| uses: subosito/flutter-action@v2 | |
| with: | |
| flutter-version: ${{ env.flutter_version }} | |
| channel: ${{ env.flutter_channel }} | |
| - name: Install dependencies | |
| run: flutter pub get | |
| - name: Run tests and generate coverage | |
| run: flutter test --coverage -r expanded . | |
| - name: Upload coverage to codecov | |
| uses: codecov/codecov-action@v3 | |
| with: | |
| token: ${{ secrets.CODECOV_TOKEN }} | |
| verbose: true | |
| directory: coverage | |
| files: coverage/lcov.info |