Update test_coverage.yaml #2
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: Flutter CI | |
on: | |
push: | |
branches: [main] | |
pull_request: | |
branches: [main] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v2 | |
- name: Set up Flutter | |
uses: subosito/flutter-action@v2 | |
with: | |
flutter-version: '3.10.6' | |
- name: Install dependencies | |
run: flutter pub get | |
- name: Run tests with coverage | |
run: flutter test --coverage | |
- name: Install lcov | |
run: sudo apt-get install lcov | |
- name: Generate HTML report | |
run: genhtml coverage/lcov.info -o coverage/html | |
- name: Upload coverage report | |
uses: actions/upload-artifact@v2 | |
with: | |
name: coverage-report | |
path: coverage | |
- name: Display coverage report link | |
run: | | |
echo "Coverage report generated and uploaded. View the artifact in the GitHub Actions interface." | |
echo "Coverage report available at: https://raw.githack.com/Nialixus/api_bloc/main/coverage/html/index.html" | |
- name: Git Push | |
uses: ad-m/github-push-action@master | |
with: | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
branch: ${{ github.ref }} |