diff --git a/.github/workflows/coverage-test.yml b/.github/workflows/coverage-test.yml new file mode 100644 index 0000000..b66cc22 --- /dev/null +++ b/.github/workflows/coverage-test.yml @@ -0,0 +1,42 @@ +name: CI - Test Coverage + +on: + # Triggers the workflow on push or pull request events but only for the main branch + push: + branches: [ master ] + pull_request: + branches: [ master ] + + # Allows you to run this workflow manually from the Actions tab + workflow_dispatch: {} + +# A workflow run is made up of one or more jobs that can run sequentially or in parallel +jobs: + # This workflow contains a single job called "build" + build: + # The type of runner that the job will run on + runs-on: ubuntu-18.04 + + # Steps represent a sequence of tasks that will be executed as part of the job + steps: + # Determine the actions that will be use + - uses: actions/checkout@v2 + + # Runs a single command using the runners shell + - name: Flutter action + uses: subosito/flutter-action@v1.5.0 + + + # Runs a set of commands using the runners shell + - name: Install dependencies + run: flutter pub get + + - name: Test app + run: flutter test --coverage + + - name: Upload coverage to Codecov + uses: codecov/codecov-action@v1 + with: + # Replace the following line with your own token + token: ${{ secrets.CODECOV_SECRET }} + file: coverage/lcov.info