🔀 Merge pull request #368 from COS301-SE-2024/dev/fix/endangered #370
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 tests and coverage | |
on: | |
push: | |
branches: | |
- main | |
- development | |
- 'dev/test/**' | |
paths: | |
- beakpeek/** | |
pull_request: | |
branches: | |
- main | |
- development | |
paths: | |
- beakpeek/** | |
workflow_dispatch: | |
workflow_call: | |
secrets: | |
CODECOV_TOKEN: | |
required: true | |
defaults: | |
run: | |
working-directory: ./beakpeek | |
jobs: | |
Run-Flutter-Tests: | |
name: 🧪 Test flutter | |
runs-on: ubuntu-latest | |
steps: | |
- name: Clone repository | |
uses: actions/checkout@v4 | |
- name: Set up Flutter | |
uses: subosito/[email protected] | |
with: | |
channel: stable | |
cache: true | |
pub-cache-key: ${{hashFiles('**/pubspec.yaml')}} | |
- name: Install Flutter dependecies | |
run: flutter pub get | |
- name: Run Flutter tests | |
run: flutter test --coverage | |
- name: Upload Flutter Coverage to Codecov | |
if: ${{ !env.ACT }} | |
uses: codecov/codecov-action@v3 | |
with: | |
files: ./beakpeek/coverage/lcov.info | |
token: ${{ secrets.CODECOV_TOKEN }} | |
fail_ci_if_error: true | |
verbose: true | |
name: Flutter Coverage |