Merge pull request #7 from Corkscrews/feature/breakpoints #48
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: 🧪 Test and Coverage | |
| on: | |
| push: | |
| branches: [ master ] | |
| pull_request: | |
| branches: [ master ] | |
| jobs: | |
| test: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: 🔄 Checkout repository | |
| uses: actions/checkout@v4 | |
| - name: 💾 Cache Flutter dependencies | |
| uses: actions/cache@v4 | |
| with: | |
| path: | | |
| ~/.pub-cache | |
| .dart_tool | |
| key: ${{ runner.os }}-flutter-${{ hashFiles('**/pubspec.lock') }} | |
| restore-keys: | | |
| ${{ runner.os }}-flutter- | |
| - name: ⚙️ Set up Flutter | |
| uses: subosito/flutter-action@v2 | |
| with: | |
| flutter-version: '3.19.6' | |
| channel: 'stable' | |
| - name: 📥 Install dependencies | |
| run: flutter pub get | |
| - name: 🔍 Run linter | |
| run: flutter analyze | |
| - name: 🧪 Run tests with coverage | |
| run: flutter test --coverage | |
| - name: 📦 Install lcov | |
| run: sudo apt-get update && sudo apt-get install -y lcov | |
| - name: 📊 Generate HTML coverage report | |
| run: genhtml coverage/lcov.info --output-directory coverage/html | |
| - name: 📤 Upload coverage artifact | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: coverage-report | |
| path: coverage/lcov.info | |
| - name: 📤 Upload HTML coverage report | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: coverage-html | |
| path: coverage/html |