Documention #33
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: 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/lcov.info | |
Codecov-Upload: | |
# needs: test | |
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 |