Skip to content

Update ci.yml

Update ci.yml #30

Workflow file for this run

name: CICD
on:
push:
branches:
- main
pull_request:
branches:
- main
defaults:
run:
working-directory: ./beakpeek
jobs:
Run-Flutter-Tests:
runs-on: ubuntu-latest
steps:
- name: Clone repository
uses: actions/checkout@v4
- name: Set up Flutter
uses: subosito/flutter-action@v2
with:
channel: stable
- name: Cache Flutter dependancies
uses: actions/cache@v3
with:
path: |
~./.pub-cache
~./.flutter
keys: ${{ runner.os }}-pub-${{ hashFiles('**/pubspec.yaml') }}
restore-keys: |
${{ runner.os }}-pub-
- name: Install Flutter dependecies
run: flutter pub get
- name: Run Flutter tests
run: flutter test --coverage
- name: Upload coverage artifact
uses: actions/upload-artifact@v3
with:
name: flutter-coverage-report
path: ./beakpeek/coverage
Codecov-Upload:
needs: Run-Flutter-Tests
runs-on: ubuntu-latest
steps:
- name: Download coverage artifact
uses: actions/download-artifact@v3
with:
name: flutter-coverage-report
path: ./beakpeak/coverage
- name: Upload Flutter Coverage to Codecov
uses: codecov/codecov-action@v3
with:
files: lcov.info
token: ${{ secrets.CODECOV_TOKEN }}
fail_ci_if_error: true
verbose: true