diff --git a/.github/workflows/flutter_tests.yaml b/.github/workflows/flutter_tests.yaml new file mode 100644 index 00000000..0d592286 --- /dev/null +++ b/.github/workflows/flutter_tests.yaml @@ -0,0 +1,35 @@ +name: Flutter Tests + +on: + pull_request: + +jobs: + test: + name: Run Tests + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + + - name: Install Flutter + uses: subosito/flutter-action@v2 + with: + flutter-version: '3.10.0' + cache: true + cache-key: 'flutter-macos-stable-3.10.0-apple' + cache-path: '${{ runner.tool_cache }}/flutter/macos-stable-3.10.0-apple' + pub-cache-key: 'flutter-pub-macos-stable-3.10.0-apple' + + - name: Get dependencies + run: flutter pub get + + - name: Analyze project + run: flutter analyze + + - name: Run tests + run: flutter test --coverage + + - name: Upload coverage reports to Codecov + uses: codecov/codecov-action@v3 + with: + file: ./coverage/lcov.info + fail_ci_if_error: false diff --git a/README.md b/README.md index a807bb72..cfdbbaf6 100644 --- a/README.md +++ b/README.md @@ -3,7 +3,7 @@ # ShowCaseView -[![Build](https://github.com/SimformSolutionsPvtLtd/flutter_showcaseview/actions/workflows/flutter.yaml/badge.svg?branch=master)](https://github.com/SimformSolutionsPvtLtd/flutter_showcaseview/actions) [![showcaseview](https://img.shields.io/pub/v/showcaseview?label=showcaseview)](https://pub.dev/packages/showcaseview) +[![showcaseview](https://img.shields.io/pub/v/showcaseview?label=showcaseview)](https://pub.dev/packages/showcaseview) [![Build](https://github.com/SimformSolutionsPvtLtd/flutter_showcaseview/actions/workflows/flutter.yaml/badge.svg?branch=master)](https://github.com/SimformSolutionsPvtLtd/flutter_showcaseview/actions) [![Tests](https://github.com/SimformSolutionsPvtLtd/flutter_showcaseview/actions/workflows/flutter_tests.yaml/badge.svg?branch=master)](https://github.com/SimformSolutionsPvtLtd/flutter_showcaseview/actions) A Flutter package allows you to Showcase/Highlight your widgets. diff --git a/test/test.dart b/test/test.dart new file mode 100644 index 00000000..8b137891 --- /dev/null +++ b/test/test.dart @@ -0,0 +1 @@ +