Skip to content

Add GitHub Actions workflow for test coverage #4

Add GitHub Actions workflow for test coverage

Add GitHub Actions workflow for test coverage #4

name: Test Coverage
on:
push:
branches:
- main
pull_request:
branches:
- main
# This workaround will be fixed after integration with the building workflow for OpenVINO bindings
env:
BINDINGS_RELEASE: untagged-7fa30b9a6a885e38ac9d
jobs:
test:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Download OpenVINO bindings
run: |
gh release download $BINDINGS_RELEASE -D bindings -p linux_bindings.tgz
tar -xzf linux_bindings.tgz -C bindings
rm linux_bindings.tgz
- name: Set up Flutter
uses: subosito/flutter-action@v2
with:
channel: stable
flutter-version-file: pubspec.yaml
- name: Install dependencies
run: flutter pub get
- name: Run tests
run: flutter test --coverage --no-pub
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v2
with:
files: coverage/lcov.info
flags: unittests
name: codecov-umbrella
fail_ci_if_error: true
token: ${{ secrets.CODECOV_TOKEN }}
integration_tests:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Download OpenVINO bindings
run: |
gh release download $BINDINGS_RELEASE -D bindings -p linux_bindings.tgz
tar -xzf linux_bindings.tgz -C bindings
rm linux_bindings.tgz
- name: Set up Flutter
uses: subosito/flutter-action@v2
with:
channel: stable
flutter-version-file: pubspec.yaml
- name: Install dependencies
run: flutter pub get
- name: Run integration tests
run: flutter test --coverage --no-pub integration_test
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v2
with:
files: coverage/lcov.info
flags: integrationtests
name: codecov-umbrella
fail_ci_if_error: true
token: ${{ secrets.CODECOV_TOKEN }}