Skip to content

LD-124 Add robolectric tests support #1122

LD-124 Add robolectric tests support

LD-124 Add robolectric tests support #1122

Workflow file for this run

name: Run unit tests
on:
pull_request:
push:
branches:
- "develop"
- "main"
concurrency:
group: ${{ github.ref }}-${{ github.workflow }}
cancel-in-progress: true
permissions:
actions: read
checks: write
contents: read
deployments: read
id-token: read

Check failure on line 19 in .github/workflows/run-unit-test.yml

View workflow run for this annotation

GitHub Actions / Run unit tests

Invalid workflow file

The workflow is not valid. .github/workflows/run-unit-test.yml (Line: 19, Col: 13): Unexpected value 'read'
issues: read
discussions: read
packages: read
pages: read
pull-requests: read
repository-projects: read
security-events: read
statuses: read
jobs:
unit-tests:
runs-on: ubuntu-20.04
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Prepare Android Environment
uses: ./.github/actions/prepare-android-env
- name: Run test
run: ./gradlew test
env:
GITHUB_USER: ${{ github.actor }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Test Report
uses: dorny/test-reporter@v1
if: success() || failure() # run this step even if previous step failed
with:
name: JEST Tests
path: "*/build/test-results/**/*.xml"
reporter: java-junit
- name: Upload failed tests results
if: failure()
uses: actions/upload-artifact@v3
with:
name: failed-tests-results
path: |
*/build/reports/**
- 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 }}