Run Unit tests and Code coverage #26
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: Run Unit tests and Code coverage | |
| on: | |
| push: | |
| branches: [ main ] | |
| schedule: | |
| - cron: '0 3 * * 5' # Runs every Friday at 3 AM UTC | |
| jobs: | |
| test: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v3 | |
| - name: Set up Flutter | |
| uses: subosito/flutter-action@v2 | |
| with: | |
| flutter-version: '3.29.0' | |
| - name: Install dependencies | |
| run: flutter pub get | |
| - name: Install lcov | |
| run: sudo apt-get update && sudo apt-get install -y lcov | |
| - name: Run tests and generate report | |
| run: sh run_tests_and_report.sh | |
| - name: Generate coverage report | |
| run: sh run_generate_coverage.sh | |
| - name: Upload build artifacts | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: build-artifacts | |
| path: build/results |