diff --git a/.github/workflows/run-code-coverage.yml b/.github/workflows/run-code-coverage.yml new file mode 100644 index 000000000..e4b6da2bb --- /dev/null +++ b/.github/workflows/run-code-coverage.yml @@ -0,0 +1,35 @@ +name: Run code coverage + +on: + pull_request: + push: + branches: + - "develop" + - "main" + + # 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: macos-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 + + # Execute unit tests + - name: Unit Test with Android Emulator Runner + uses: ReactiveCircus/android-emulator-runner@v2.14.3 + with: + api-level: 29 + script: ./gradlew connectedCheck + + # run: ./gradlew testDebugUnitTest + + - name: generate report + uses: actions/upload-artifact@v2 + with: + name: report + path: app/build/reports/coverage/debug \ No newline at end of file diff --git a/.github/workflows/run-unit-test.yml b/.github/workflows/run-unit-test.yml index 3f5d55a6f..38a5508cd 100644 --- a/.github/workflows/run-unit-test.yml +++ b/.github/workflows/run-unit-test.yml @@ -1,45 +1,45 @@ -name: Run unit tests - -on: - pull_request: - push: - branches: - - "develop" - - "main" - -concurrency: - group: ${{ github.ref }}-${{ github.workflow }} - cancel-in-progress: true - -permissions: read-all - -jobs: - unit-tests: - runs-on: macos-latest - - steps: - - name: Checkout - uses: actions/checkout@v3 - - - name: Unit Test with Android Emulator Runner - uses: reactivecircus/android-emulator-runner@v2 - with: - api-level: 29 - script: ./gradlew connectedCheck - - env: - GITHUB_USER: ${{ github.actor }} - - - name: Upload report - uses: actions/upload-artifact@v2 - with: - name: report - path: app/build/reports/coverage/androidTest/debug - - - name: Include Slack Notification - if: failure() && (github.ref == 'refs/heads/develop' || github.ref == 'refs/heads/master') - uses: ./.github/actions/slack-notification - env: - SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }} - SLACK_GIT_REF: ${{ github.ref }} - SLACK_WORKFLOW: ${{ github.workflow }} +#name: Run unit tests +# +#on: +# pull_request: +# push: +# branches: +# - "develop" +# - "main" +# +#concurrency: +# group: ${{ github.ref }}-${{ github.workflow }} +# cancel-in-progress: true +# +#permissions: read-all +# +#jobs: +# unit-tests: +# runs-on: macos-latest +# +# steps: +# - name: Checkout +# uses: actions/checkout@v3 +# +# - name: Unit Test with Android Emulator Runner +# uses: reactivecircus/android-emulator-runner@v2 +# with: +# api-level: 29 +# script: ./gradlew connectedCheck +# +# env: +# GITHUB_USER: ${{ github.actor }} +# +# - name: Upload report +# uses: actions/upload-artifact@v2 +# with: +# name: report +# path: app/build/reports/coverage/androidTest/debug +# +# - name: Include Slack Notification +# if: failure() && (github.ref == 'refs/heads/develop' || github.ref == 'refs/heads/master') +# uses: ./.github/actions/slack-notification +# env: +# SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }} +# SLACK_GIT_REF: ${{ github.ref }} +# SLACK_WORKFLOW: ${{ github.workflow }}