feat: ποΈ Added Github action for test cases #8
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: Flutter Tests | |
| on: | |
| pull_request: | |
| jobs: | |
| test: | |
| name: Run Tests | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Install Flutter | |
| uses: subosito/flutter-action@v2 | |
| with: | |
| flutter-version: '3.10.0' | |
| cache: true | |
| cache-key: 'flutter-macos-stable-3.10.0-apple' | |
| cache-path: '${{ runner.tool_cache }}/flutter/macos-stable-3.10.0-apple' | |
| pub-cache-key: 'flutter-pub-macos-stable-3.10.0-apple' | |
| - name: Get dependencies | |
| run: flutter pub get | |
| - name: Analyze project | |
| run: flutter analyze | |
| - name: Run tests | |
| run: flutter test --coverage | |
| - name: Upload coverage reports to Codecov | |
| uses: codecov/codecov-action@v3 | |
| with: | |
| file: ./coverage/lcov.info | |
| fail_ci_if_error: false |