From 3bcf72516faf7373ffbedebff821f4f4af7f0cdd Mon Sep 17 00:00:00 2001 From: Changlin Su <41277350+Sheldonsu28@users.noreply.github.com> Date: Thu, 3 Jun 2021 11:18:20 -0400 Subject: [PATCH 1/2] add test coverage action file --- .github/workflows/coverage-test.yml | 43 +++++++++++++++++++++++++++++ 1 file changed, 43 insertions(+) create mode 100644 .github/workflows/coverage-test.yml diff --git a/.github/workflows/coverage-test.yml b/.github/workflows/coverage-test.yml new file mode 100644 index 0000000..3224cf9 --- /dev/null +++ b/.github/workflows/coverage-test.yml @@ -0,0 +1,43 @@ +name: Coverage-test + +# Controls when the action will run. +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-latest + + # Steps represent a sequence of tasks that will be executed as part of the job + steps: + # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it + - 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 From 10e3f61e98588e96b8f83095ac89fe133f52c198 Mon Sep 17 00:00:00 2001 From: Changlin Su <41277350+Sheldonsu28@users.noreply.github.com> Date: Fri, 18 Jun 2021 13:28:16 -0400 Subject: [PATCH 2/2] Update coverage-test.yml --- .github/workflows/coverage-test.yml | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/.github/workflows/coverage-test.yml b/.github/workflows/coverage-test.yml index 3224cf9..b66cc22 100644 --- a/.github/workflows/coverage-test.yml +++ b/.github/workflows/coverage-test.yml @@ -1,6 +1,5 @@ -name: Coverage-test +name: CI - Test Coverage -# Controls when the action will run. on: # Triggers the workflow on push or pull request events but only for the main branch push: @@ -9,18 +8,18 @@ on: branches: [ master ] # Allows you to run this workflow manually from the Actions tab - workflow_dispatch: + 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-latest + runs-on: ubuntu-18.04 # Steps represent a sequence of tasks that will be executed as part of the job steps: - # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it + # Determine the actions that will be use - uses: actions/checkout@v2 # Runs a single command using the runners shell